1 |
buildscript {
|
2 |
repositories {
|
3 |
jcenter()
|
4 |
}
|
5 |
}
|
6 |
|
7 |
apply plugin: 'com.android.application'
|
8 |
// -------QC-------
|
9 |
// apply plugin: 'com.neenbedankt.android-apt'
|
10 |
apply plugin: 'net.ltgt.apt'
|
11 |
apply from: '../config/quality.gradle'
|
12 |
apply plugin: 'spoon'
|
13 |
// -------QC-------
|
14 |
|
15 |
repositories {
|
16 |
jcenter()
|
17 |
|
18 |
flatDir {
|
19 |
dirs 'libs'
|
20 |
}
|
21 |
}
|
22 |
|
23 |
dependencies {
|
24 |
// dependencies for app building
|
25 |
|
26 |
compile project(':android-about-page')
|
27 |
|
28 |
compile fileTree(dir: 'libs', include: '*.jar')
|
29 |
compile project(':android-support-v7-appcompat')
|
30 |
compile project(':android-support-annotations')
|
31 |
compile project(':android-support-vector-drawable')
|
32 |
|
33 |
// androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
|
34 |
|
35 |
}
|
36 |
|
37 |
task deleteStuff(type: Delete) {
|
38 |
logging.captureStandardOutput LogLevel.INFO
|
39 |
|
40 |
def sysprops = System.getProperties()
|
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 |
|
64 |
}
|
65 |
else
|
66 |
{
|
67 |
println 'not on Android Studio'
|
68 |
}
|
69 |
}
|
70 |
|
71 |
android {
|
72 |
compileSdkVersion 24
|
73 |
buildToolsVersion "24.0.2"
|
74 |
|
75 |
compileOptions.encoding = 'UTF-8'
|
76 |
|
77 |
defaultConfig {
|
78 |
minSdkVersion 9
|
79 |
targetSdkVersion 23
|
80 |
|
81 |
jackOptions {
|
82 |
enabled true
|
83 |
}
|
84 |
|
85 |
vectorDrawables.useSupportLibrary = true
|
86 |
// generatedDensities = []
|
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 |
|
106 |
}
|
107 |
|
108 |
aaptOptions {
|
109 |
additionalParameters "--no-version-vectors"
|
110 |
}
|
111 |
|
112 |
|
113 |
dexOptions {
|
114 |
javaMaxHeapSize "2.2g"
|
115 |
}
|
116 |
|
117 |
sourceSets {
|
118 |
main {
|
119 |
manifest.srcFile 'AndroidManifest.xml'
|
120 |
java.srcDirs = ['src']
|
121 |
resources.srcDirs = ['src']
|
122 |
aidl.srcDirs = ['src', 'aidl']
|
123 |
renderscript.srcDirs = ['src']
|
124 |
res.srcDirs = ['res']
|
125 |
assets.srcDirs = ['assets']
|
126 |
jniLibs.srcDirs = ['nativelibs']
|
127 |
}
|
128 |
}
|
129 |
|
130 |
compileOptions {
|
131 |
encoding "UTF-8"
|
132 |
sourceCompatibility JavaVersion.VERSION_1_8
|
133 |
targetCompatibility JavaVersion.VERSION_1_8
|
134 |
}
|
135 |
|
136 |
lintOptions {
|
137 |
abortOnError false
|
138 |
}
|
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 |
|
154 |
packagingOptions {
|
155 |
exclude 'META-INF/LICENSE.txt'
|
156 |
// -------QC-------
|
157 |
exclude 'LICENSE.txt'
|
158 |
exclude 'META-INF/NOTICE.txt'
|
159 |
exclude 'META-INF/ASL2.0'
|
160 |
exclude 'META-INF/LICENSE'
|
161 |
exclude 'META-INF/NOTICE'
|
162 |
// -------QC-------
|
163 |
}
|
164 |
|
165 |
}
|
166 |
|
167 |
|