build.gradle 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. }
  5. dependencies {
  6. classpath 'com.android.tools.build:gradle:2.1.3'
  7. classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.0'
  8. }
  9. }
  10. apply plugin: 'com.android.application'
  11. apply plugin: 'com.google.protobuf'
  12. android {
  13. compileSdkVersion 25
  14. buildToolsVersion '24.0.0'
  15. defaultConfig {
  16. minSdkVersion 21
  17. targetSdkVersion 25
  18. versionCode 1
  19. versionName "1.0"
  20. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  21. }
  22. buildTypes {
  23. debug {
  24. minifyEnabled false
  25. }
  26. }
  27. productFlavors {
  28. aosp {
  29. applicationId 'com.android.launcher3'
  30. testApplicationId 'com.android.launcher3.tests'
  31. }
  32. }
  33. sourceSets {
  34. main {
  35. res.srcDirs = ['res']
  36. java.srcDirs = ['src', 'src_config']
  37. manifest.srcFile 'AndroidManifest-common.xml'
  38. proto.srcDirs 'protos/'
  39. }
  40. androidTest {
  41. java.srcDirs = ['tests/src']
  42. manifest.srcFile "tests/AndroidManifest.xml"
  43. }
  44. aosp {
  45. manifest.srcFile "AndroidManifest.xml"
  46. }
  47. }
  48. }
  49. repositories {
  50. mavenCentral()
  51. }
  52. dependencies {
  53. compile 'com.android.support:support-v4:23.1.1'
  54. compile 'com.android.support:recyclerview-v7:23.1.1'
  55. compile 'com.android.support:palette-v7:23.2.0'
  56. compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-2'
  57. testCompile 'junit:junit:4.12'
  58. androidTestCompile 'com.android.support.test:runner:0.5'
  59. androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
  60. androidTestCompile 'com.android.support:support-annotations:23.2.0'
  61. }
  62. protobuf {
  63. // Configure the protoc executable
  64. protoc {
  65. artifact = 'com.google.protobuf:protoc:3.0.0-alpha-3'
  66. generateProtoTasks {
  67. all().each { task ->
  68. task.builtins {
  69. remove java
  70. javanano {
  71. option 'ignore_services=false'
  72. }
  73. }
  74. }
  75. }
  76. }
  77. }