build.gradle 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. apply from: configPath
  2. apply from: "$scriptPath/android_app.gradle"
  3. apply from: protobufNanoConfig
  4. android {
  5. namespace 'com.android.launcher3'
  6. defaultConfig {
  7. versionCode 27
  8. versionName "8.1"
  9. }
  10. flavorDimensions = ["app"]
  11. productFlavors {
  12. aosp {
  13. dimension "app"
  14. }
  15. }
  16. sourceSets {
  17. main {
  18. res.srcDirs = ["$launcherCode/res"]
  19. java.srcDirs = ["$launcherCode/src", "$launcherCode/src_config"]
  20. manifest.srcFile "$launcherCode/AndroidManifest-common.xml"
  21. proto {
  22. srcDir "$launcherCode/protos/"
  23. srcDir "$launcherCode/proto_overrides/"
  24. }
  25. }
  26. aosp {
  27. java.srcDirs = ["$launcherCode/src_flags"]
  28. manifest.srcFile "$launcherCode/AndroidManifest.xml"
  29. }
  30. }
  31. compileOptions {
  32. sourceCompatibility JavaVersion.VERSION_1_8
  33. targetCompatibility JavaVersion.VERSION_1_8
  34. }
  35. }
  36. final String SUPPORT_LIBS_VERSION = '26.0.0'
  37. dependencies {
  38. implementation "com.android.support:support-v4:${SUPPORT_LIBS_VERSION}"
  39. implementation "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}"
  40. implementation "com.android.support:palette-v7:${SUPPORT_LIBS_VERSION}"
  41. implementation "com.android.support:support-dynamic-animation:${SUPPORT_LIBS_VERSION}"
  42. }
  43. protobuf {
  44. generateProtoTasks {
  45. all().each { task ->
  46. task.builtins {
  47. javanano {
  48. option "java_package=launcher_log_extension.proto|com.android.launcher3.userevent.nano"
  49. option "java_package=launcher_log.proto|com.android.launcher3.userevent.nano"
  50. option "java_package=launcher_dump.proto|com.android.launcher3.model.nano"
  51. option "enum_style=java"
  52. }
  53. }
  54. }
  55. }
  56. }