65 lines
1.8 KiB
Groovy
65 lines
1.8 KiB
Groovy
plugins {
|
|
id 'sysuigradleproject.android-library-conventions'
|
|
id 'org.jetbrains.kotlin.android'
|
|
id 'com.google.protobuf'
|
|
}
|
|
|
|
final String PROTOS_DIR = "${ANDROID_TOP}/frameworks/libs/systemui/viewcapturelib/src/com/android/app/viewcapture/proto"
|
|
|
|
android {
|
|
compileSdk TARGET_SDK.toInteger()
|
|
buildToolsVersion = BUILD_TOOLS_VERSION
|
|
|
|
defaultConfig {
|
|
minSdkVersion TARGET_SDK.toInteger()
|
|
targetSdkVersion TARGET_SDK.toInteger()
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java.srcDirs = ['src']
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
proto.srcDirs = ["${PROTOS_DIR}"]
|
|
}
|
|
androidTest {
|
|
java.srcDirs = ["tests"]
|
|
manifest.srcFile "tests/AndroidManifest.xml"
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation "androidx.core:core:1.9.0"
|
|
implementation "com.google.protobuf:protobuf-lite:${protobuf_version}"
|
|
androidTestImplementation project(':SharedTestLib')
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
|
androidTestImplementation "androidx.test:rules:1.4.0"
|
|
}
|
|
|
|
protobuf {
|
|
// Configure the protoc executable
|
|
protoc {
|
|
artifact = "com.google.protobuf:protoc:${protobuf_version}${PROTO_ARCH_SUFFIX}"
|
|
}
|
|
plugins {
|
|
javalite {
|
|
// The codegen for lite comes as a separate artifact
|
|
artifact = "com.google.protobuf:protoc-gen-javalite:${protobuf_version}${PROTO_ARCH_SUFFIX}"
|
|
}
|
|
}
|
|
generateProtoTasks {
|
|
all().each { task ->
|
|
task.builtins {
|
|
remove java
|
|
}
|
|
task.plugins {
|
|
javalite { }
|
|
}
|
|
}
|
|
}
|
|
} |