OSDN Git Service

release-request-276f9f52-87fd-4915-bd79-9a2f0ee77433-for-git_oc-release-4090213 snap...
[android-x86/packages-apps-Launcher3.git] / build.gradle
1 buildscript {
2     repositories {
3         mavenCentral()
4         jcenter()
5     }
6     dependencies {
7         classpath 'com.android.tools.build:gradle:2.3.1'
8         classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.0'
9     }
10 }
11
12 apply plugin: 'com.android.application'
13 apply plugin: 'com.google.protobuf'
14
15 android {
16     compileSdkVersion 26
17     buildToolsVersion '26.0.0'
18
19     defaultConfig {
20         minSdkVersion 21
21         targetSdkVersion 26
22         versionCode 1
23         versionName "1.0"
24
25         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
26     }
27     buildTypes {
28         debug {
29             minifyEnabled false
30         }
31     }
32
33     productFlavors {
34         aosp {
35             applicationId 'com.android.launcher3'
36             testApplicationId 'com.android.launcher3.tests'
37         }
38     }
39     sourceSets {
40         main {
41             res.srcDirs = ['res']
42             java.srcDirs = ['src', 'src_config']
43             manifest.srcFile 'AndroidManifest-common.xml'
44             proto.srcDirs 'protos/'
45         }
46
47         androidTest {
48             java.srcDirs = ['tests/src']
49             res.srcDirs = ['tests/res']
50             manifest.srcFile "tests/AndroidManifest-common.xml"
51         }
52
53         aosp {
54             manifest.srcFile "AndroidManifest.xml"
55         }
56
57         aospAndroidTest {
58             manifest.srcFile "tests/AndroidManifest.xml"
59         }
60     }
61 }
62
63 repositories {
64     mavenCentral()
65     jcenter()
66 }
67
68 final String SUPPORT_LIBS_VERSION = '26.0.0-SNAPSHOT'
69 dependencies {
70     compile "com.android.support:support-v4:${SUPPORT_LIBS_VERSION}"
71     compile "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}"
72     compile "com.android.support:palette-v7:${SUPPORT_LIBS_VERSION}"
73     compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-2'
74
75     testCompile 'junit:junit:4.12'
76     androidTestCompile "org.mockito:mockito-core:1.+"
77     androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
78     androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
79     androidTestCompile 'com.android.support.test:runner:0.5'
80     androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
81     androidTestCompile "com.android.support:support-annotations:${SUPPORT_LIBS_VERSION}"
82 }
83
84 protobuf {
85     // Configure the protoc executable
86     protoc {
87         artifact = 'com.google.protobuf:protoc:3.0.0-alpha-3'
88
89         generateProtoTasks {
90             all().each { task ->
91                 task.builtins {
92                     remove java
93                     javanano {
94                         option "java_package=launcher_log.proto|com.android.launcher3.userevent.nano"
95                         option "enum_style=java"
96                     }
97                 }
98             }
99         }
100     }
101 }