1plugins { 2 id 'com.android.library' 3 id 'org.jetbrains.kotlin.android' 4 id 'com.google.protobuf' 5} 6 7final String PROTOS_DIR = "${ANDROID_TOP}/frameworks/libs/systemui/motiontoollib/src/com/android/app/motiontool/proto" 8 9android { 10 namespace = "com.android.app.motiontool" 11 testNamespace = "com.android.app.motiontool.tests" 12 defaultConfig { 13 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 14 } 15 16 sourceSets { 17 main { 18 java.srcDirs = ['src'] 19 manifest.srcFile 'AndroidManifest.xml' 20 proto.srcDirs = ["${PROTOS_DIR}"] 21 } 22 androidTest { 23 java.srcDirs = ["tests"] 24 manifest.srcFile "tests/AndroidManifest.xml" 25 } 26 } 27 lint { 28 abortOnError false 29 } 30 31} 32 33dependencies { 34 implementation "androidx.core:core:1.9.0" 35 implementation "com.google.protobuf:protobuf-lite:${protobuf_lite_version}" 36 api project(":ViewCaptureLib") 37 androidTestImplementation project(':SharedTestLib') 38 androidTestImplementation 'androidx.test.ext:junit:1.1.3' 39 androidTestImplementation "androidx.test:rules:1.4.0" 40} 41 42protobuf { 43 // Configure the protoc executable 44 protoc { 45 artifact = "com.google.protobuf:protoc:${protobuf_version}${PROTO_ARCH_SUFFIX}" 46 } 47 plugins { 48 javalite { 49 // The codegen for lite comes as a separate artifact 50 artifact = "com.google.protobuf:protoc-gen-javalite:${protobuf_lite_version}${PROTO_ARCH_SUFFIX}" 51 } 52 } 53 generateProtoTasks { 54 all().each { task -> 55 task.builtins { 56 remove java 57 } 58 task.plugins { 59 javalite { } 60 } 61 } 62 } 63} 64