OSDN Git Service

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