1 | |
|
|
2 | buildscript { |
1 | buildscript {
|
3 | repositories { |
2 | repositories {
|
4 | jcenter() |
3 | jcenter()
|
5 | } |
4 | }
|
6 | } |
5 | }
|
7 | |
6 |
|
8 | apply plugin: 'com.android.application' |
7 | apply plugin: 'com.android.application'
|
9 | // -------QC------- |
8 | // -------QC-------
|
10 | // apply plugin: 'com.neenbedankt.android-apt' |
9 | // apply plugin: 'com.neenbedankt.android-apt'
|
11 | apply plugin: 'net.ltgt.apt' |
10 | apply plugin: 'net.ltgt.apt'
|
12 | apply from: '../config/quality.gradle' |
11 | apply from: '../config/quality.gradle'
|
13 | apply plugin: 'spoon' |
12 | apply plugin: 'spoon'
|
14 | // -------QC------- |
13 | // -------QC-------
|
15 | |
14 |
|
16 | repositories { |
15 | repositories {
|
17 | jcenter() |
16 | jcenter()
|
18 | |
17 |
|
19 | flatDir { |
18 | flatDir {
|
20 | dirs 'lib' |
19 | dirs 'libs'
|
21 | } |
20 | }
|
22 | } |
21 | }
|
23 | |
22 |
|
24 | dependencies { |
23 | dependencies {
|
25 | // dependencies for app building |
24 | // dependencies for app building
|
26 | |
25 |
|
27 | compile project(':android-about-page') |
26 | compile project(':android-about-page')
|
28 | |
27 |
|
29 | compile fileTree(dir: 'lib', include: '*.jar') |
28 | compile fileTree(dir: 'libs', include: '*.jar')
|
30 | compile project(':android-support-v7-appcompat') |
29 | compile project(':android-support-v7-appcompat')
|
31 | compile project(':android-support-annotations') |
30 | compile project(':android-support-annotations')
|
32 | compile project(':android-support-vector-drawable') |
31 | compile project(':android-support-vector-drawable')
|
33 | |
32 |
|
34 | // androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1' |
33 | // androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
|
35 | |
34 |
|
36 | } |
35 | }
|
37 | |
36 |
|
38 | |
37 | task deleteStuff(type: Delete) {
|
39 | tasks.withType(Test) { |
38 | logging.captureStandardOutput LogLevel.INFO
|
40 | // increased logging for tests |
39 |
|
41 | testLogging { |
40 | def sysprops = System.getProperties()
|
42 | events "passed", "skipped", "failed" |
41 | if (sysprops['idea.platform.prefix'] != null) {
|
|
|
42 |
|
|
|
43 | println 'deleteStuff on Android Studio Build'
|
|
|
44 | println new File(".").absolutePath
|
|
|
45 |
|
|
|
46 | FileTree tree1 = fileTree(dir: "nativelibs/armeabi");
|
|
|
47 | tree1.each {
|
|
|
48 | File file ->
|
|
|
49 | delete(file)
|
|
|
50 | }
|
|
|
51 |
|
|
|
52 | FileTree tree2 = fileTree(dir: "nativelibs/armeabi-v7a");
|
|
|
53 | tree2.each {
|
|
|
54 | File file ->
|
|
|
55 | delete(file)
|
|
|
56 | }
|
|
|
57 |
|
|
|
58 | FileTree tree3 = fileTree(dir: "nativelibs/x86");
|
|
|
59 | tree3.each {
|
|
|
60 | File file ->
|
|
|
61 | delete(file)
|
|
|
62 | }
|
|
|
63 |
|
43 | } |
64 | }
|
44 | } |
65 | else
|
45 | |
66 | {
|
|
|
67 | println 'not on Android Studio'
|
|
|
68 | }
|
|
|
69 | }
|
|
|
70 |
|
46 | android { |
71 | android {
|
47 | compileSdkVersion 24 |
72 | compileSdkVersion 24
|
48 | buildToolsVersion "24.0.2" |
73 | buildToolsVersion "24.0.2"
|
49 | |
74 |
|
|
|
75 | compileOptions.encoding = 'UTF-8'
|
|
|
76 |
|
50 | defaultConfig { |
77 | defaultConfig {
|
51 | minSdkVersion 9 |
78 | minSdkVersion 9
|
52 | targetSdkVersion 23 |
79 | targetSdkVersion 23
|
53 | |
80 |
|
54 | jackOptions { |
81 | jackOptions {
|
55 | enabled true |
82 | enabled true
|
56 | } |
83 | }
|
57 | |
84 |
|
58 | vectorDrawables.useSupportLibrary = true |
85 | vectorDrawables.useSupportLibrary = true
|
59 | // generatedDensities = [] |
86 | // generatedDensities = []
|
60 | |
87 |
|
|
|
88 | externalNativeBuild {
|
|
|
89 | def sysprops = System.getProperties()
|
|
|
90 | if (sysprops['idea.platform.prefix'] != null) {
|
|
|
91 | cmake {
|
|
|
92 | abiFilters 'armeabi' //,'x86'
|
|
|
93 | }
|
|
|
94 | }
|
|
|
95 | }
|
|
|
96 |
|
|
|
97 | ndk {
|
|
|
98 | def sysprops = System.getProperties()
|
|
|
99 | if (sysprops['idea.platform.prefix'] != null) {
|
|
|
100 | // Specifies the ABI configurations of your native
|
|
|
101 | // libraries Gradle should build and package with your APK.
|
|
|
102 | abiFilters 'armeabi' //, 'x86'
|
|
|
103 | }
|
|
|
104 | }
|
|
|
105 |
|
61 | } |
106 | }
|
62 | |
107 |
|
63 | aaptOptions { |
108 | aaptOptions {
|
64 | additionalParameters "--no-version-vectors" |
109 | additionalParameters "--no-version-vectors"
|
65 | } |
110 | }
|
66 | |
111 |
|
67 | |
112 |
|
68 | dexOptions { |
113 | dexOptions {
|
69 | javaMaxHeapSize "1.6g" |
114 | javaMaxHeapSize "2.2g"
|
70 | } |
115 | }
|
71 | |
116 |
|
72 | sourceSets { |
117 | sourceSets {
|
73 | main { |
118 | main {
|
74 | manifest.srcFile 'AndroidManifest.xml' |
119 | manifest.srcFile 'AndroidManifest.xml'
|
75 | java.srcDirs = ['src'] |
120 | java.srcDirs = ['src']
|
76 | resources.srcDirs = ['src'] |
121 | resources.srcDirs = ['src']
|
77 | aidl.srcDirs = ['src'] |
122 | aidl.srcDirs = ['src', 'aidl']
|
78 | renderscript.srcDirs = ['src'] |
123 | renderscript.srcDirs = ['src']
|
79 | res.srcDirs = ['res'] |
124 | res.srcDirs = ['res']
|
80 | assets.srcDirs = ['assets'] |
125 | assets.srcDirs = ['assets']
|
81 | jniLibs.srcDirs = ['libs'] |
126 | jniLibs.srcDirs = ['nativelibs']
|
82 | } |
127 | }
|
83 | |
|
|
84 | } |
128 | }
|
85 | |
129 |
|
86 | compileOptions { |
130 | compileOptions {
|
87 | encoding "UTF-8" |
131 | encoding "UTF-8"
|
88 | sourceCompatibility JavaVersion.VERSION_1_8 |
132 | sourceCompatibility JavaVersion.VERSION_1_8
|
89 | targetCompatibility JavaVersion.VERSION_1_8 |
133 | targetCompatibility JavaVersion.VERSION_1_8
|
90 | } |
134 | }
|
91 | |
135 |
|
92 | lintOptions { |
136 | lintOptions {
|
93 | abortOnError false |
137 | abortOnError false
|
94 | } |
138 | }
|
95 | |
139 |
|
|
|
140 | externalNativeBuild {
|
|
|
141 |
|
|
|
142 | def sysprops = System.getProperties()
|
|
|
143 | if (sysprops['idea.platform.prefix'] != null) {
|
|
|
144 | // Built from AndroidStudio
|
|
|
145 | cmake {
|
|
|
146 | path '../../CMakeLists.txt'
|
|
|
147 | }
|
|
|
148 | } else {
|
|
|
149 | // Built from command line
|
|
|
150 | }
|
|
|
151 | }
|
|
|
152 |
|
|
|
153 |
|
96 | packagingOptions { |
154 | packagingOptions {
|
97 | exclude 'META-INF/LICENSE.txt' |
155 | exclude 'META-INF/LICENSE.txt'
|
98 | // -------QC------- |
156 | // -------QC-------
|
99 | exclude 'LICENSE.txt' |
157 | exclude 'LICENSE.txt'
|
100 | exclude 'META-INF/NOTICE.txt' |
158 | exclude 'META-INF/NOTICE.txt'
|
101 | exclude 'META-INF/ASL2.0' |
159 | exclude 'META-INF/ASL2.0'
|
102 | exclude 'META-INF/LICENSE' |
160 | exclude 'META-INF/LICENSE'
|
103 | exclude 'META-INF/NOTICE' |
161 | exclude 'META-INF/NOTICE'
|
104 | // -------QC------- |
162 | // -------QC-------
|
105 | } |
163 | }
|
106 | |
164 |
|
107 | } |
165 | }
|
108 | |
166 |
|
109 | |
167 |
|