build.gradle 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. google()
  5. }
  6. dependencies {
  7. classpath 'com.android.tools.build:gradle:3.2.0-alpha12'
  8. classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
  9. }
  10. }
  11. final String SUPPORT_LIBS_VERSION = '28.0.0-SNAPSHOT'
  12. apply plugin: 'com.android.application'
  13. apply plugin: 'com.google.protobuf'
  14. android {
  15. compileSdkVersion 28
  16. buildToolsVersion '28.0.0'
  17. defaultConfig {
  18. minSdkVersion 21
  19. targetSdkVersion 28
  20. versionCode 1
  21. versionName "1.0"
  22. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  23. vectorDrawables.useSupportLibrary = true
  24. }
  25. buildTypes {
  26. debug {
  27. minifyEnabled false
  28. }
  29. }
  30. compileOptions {
  31. sourceCompatibility JavaVersion.VERSION_1_8
  32. targetCompatibility JavaVersion.VERSION_1_8
  33. }
  34. flavorDimensions "default"
  35. productFlavors {
  36. aosp {
  37. dimension "default"
  38. applicationId 'com.android.launcher3'
  39. testApplicationId 'com.android.launcher3.tests'
  40. }
  41. l3go {
  42. dimension "default"
  43. applicationId 'com.android.launcher3'
  44. testApplicationId 'com.android.launcher3.tests'
  45. }
  46. quickstep {
  47. dimension "default"
  48. applicationId 'com.android.launcher3'
  49. testApplicationId 'com.android.launcher3.tests'
  50. }
  51. }
  52. // Disable release builds for now
  53. android.variantFilter { variant ->
  54. if (variant.buildType.name.endsWith('release')) {
  55. variant.setIgnore(true);
  56. }
  57. }
  58. sourceSets {
  59. main {
  60. res.srcDirs = ['res']
  61. java.srcDirs = ['src']
  62. manifest.srcFile 'AndroidManifest-common.xml'
  63. proto {
  64. srcDir 'protos/'
  65. srcDir 'proto_overrides/'
  66. }
  67. }
  68. debug {
  69. manifest.srcFile "AndroidManifest.xml"
  70. }
  71. androidTest {
  72. res.srcDirs = ['tests/res']
  73. java.srcDirs = ['tests/src']
  74. manifest.srcFile "tests/AndroidManifest-common.xml"
  75. }
  76. androidTestDebug {
  77. manifest.srcFile "tests/AndroidManifest.xml"
  78. }
  79. aosp {
  80. java.srcDirs = ['src_flags', "src_ui_overrides"]
  81. }
  82. l3go {
  83. res.srcDirs = ['go/res']
  84. java.srcDirs = ['go/src_flags', "src_ui_overrides"]
  85. manifest.srcFile "go/AndroidManifest.xml"
  86. }
  87. quickstep {
  88. res.srcDirs = ['quickstep/res']
  89. java.srcDirs = ['src_flags', 'quickstep/src']
  90. manifest.srcFile "quickstep/AndroidManifest.xml"
  91. }
  92. }
  93. }
  94. repositories {
  95. maven { url "../../../prebuilts/fullsdk-darwin/extras/android/m2repository" }
  96. maven { url "../../../prebuilts/fullsdk-linux/extras/android/m2repository" }
  97. mavenCentral()
  98. google()
  99. }
  100. dependencies {
  101. implementation "com.android.support:support-v4:${SUPPORT_LIBS_VERSION}"
  102. implementation "com.android.support:support-dynamic-animation:${SUPPORT_LIBS_VERSION}"
  103. implementation "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}"
  104. implementation 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'
  105. quickstepImplementation fileTree(dir: "quickstep/libs", include: 'sysui_shared.jar')
  106. testImplementation 'junit:junit:4.12'
  107. androidTestImplementation "org.mockito:mockito-core:1.9.5"
  108. androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
  109. androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
  110. androidTestImplementation 'com.android.support.test:runner:1.0.0'
  111. androidTestImplementation 'com.android.support.test:rules:1.0.0'
  112. androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
  113. androidTestImplementation "com.android.support:support-annotations:${SUPPORT_LIBS_VERSION}"
  114. }
  115. protobuf {
  116. // Configure the protoc executable
  117. protoc {
  118. artifact = 'com.google.protobuf:protoc:3.0.0-alpha-3'
  119. generateProtoTasks {
  120. all().each { task ->
  121. task.builtins {
  122. remove java
  123. javanano {
  124. option "java_package=launcher_log_extension.proto|com.android.launcher3.userevent.nano"
  125. option "java_package=launcher_log.proto|com.android.launcher3.userevent.nano"
  126. option "java_package=launcher_dump.proto|com.android.launcher3.model.nano"
  127. option "enum_style=java"
  128. }
  129. }
  130. }
  131. }
  132. }
  133. }