1/* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 18/* 19 * Experimental gradle configuration. This file may not be up to date. 20 */ 21 22apply plugin: 'com.android.library' 23apply plugin: 'com.google.protobuf' 24 25android { 26 compileSdkVersion 29 27 buildToolsVersion '29.0.2' 28 29 compileOptions() { 30 sourceCompatibility JavaVersion.VERSION_1_8 31 targetCompatibility JavaVersion.VERSION_1_8 32 } 33 34 lintOptions { 35 abortOnError false 36 } 37 38 defaultConfig { 39 minSdkVersion 23 40 resConfigs "en" 41 targetSdkVersion 28 42 versionCode 1 43 versionName "1.0" 44 } 45 46 buildTypes { 47 debug { 48 minifyEnabled false 49 buildConfigField "boolean", "AOSP", "true" 50 buildConfigField "boolean", "ENG", "true" 51 buildConfigField "boolean", "NO_JNI_TEST", "false" 52 } 53 release { 54 minifyEnabled true 55 buildConfigField "boolean", "AOSP", "true" 56 buildConfigField "boolean", "ENG", "false" 57 buildConfigField "boolean", "NO_JNI_TEST", "false" 58 } 59 } 60 61 sourceSets { 62 main { 63 res.srcDirs = ['res'] 64 java.srcDirs = ['src'] 65 java { 66 exclude '**/BuildConfig.java' 67 } 68 manifest.srcFile 'AndroidManifest.xml' 69 proto { 70 srcDir 'src/com/android/tv/common/compat/internal' 71 } 72 proto { 73 srcDir 'src/com/android/tv/common/flags/proto' 74 } 75 } 76 } 77} 78 79dependencies { 80 implementation 'androidx.annotation:annotation:1.1.0' 81 implementation 'androidx.appcompat:appcompat:1.1.0' 82 implementation 'androidx.leanback:leanback:1.1.0-alpha02' 83 implementation 'androidx.palette:palette:1.0.0' 84 implementation 'androidx.recyclerview:recyclerview:1.1.0' 85 implementation 'androidx.recyclerview:recyclerview-selection:1.0.0' 86 implementation 'androidx.tvprovider:tvprovider:1.0.0' 87 88 implementation 'com.google.android.exoplayer:exoplayer:r1.5.16' 89 implementation 'com.google.android.exoplayer:exoplayer-core:2.10.1' 90 annotationProcessor 'com.google.auto.value:auto-value:1.5.3' 91 implementation 'com.google.auto.value:auto-value:1.5.3' 92 implementation 'com.google.dagger:dagger:2.23' 93 implementation 'com.google.dagger:dagger-android:2.23' 94 annotationProcessor 'com.google.dagger:dagger-android-processor:2.23' 95 annotationProcessor 'com.google.dagger:dagger-compiler:2.23' 96 implementation 'com.google.guava:guava:28.1-jre' 97 implementation 'com.google.protobuf:protobuf-javalite:3.11.0' 98} 99 100protobuf { 101 protoc { 102 artifact = 'com.google.protobuf:protoc:3.11.0' 103 } 104 generateProtoTasks { 105 all().each { task -> 106 task.builtins { 107 java { 108 option "lite" 109 } 110 } 111 } 112 } 113} 114