build.gradle 1.7 KB

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