-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
build.gradle
116 lines (97 loc) · 3.1 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
allprojects {
repositories {
jcenter()
}
}
apply plugin: 'com.android.library'
dependencies {
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support:support-annotations:25.3.1'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'net.zetetic:android-database-sqlcipher:4.2.0@aar'
}
android {
compileSdkVersion 29
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 29
ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
testApplicationId "info.guardianproject.iocipher.tests"
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
testHandleProfiling true
testFunctionalTest true
}
// both libs/ and 'net.zetetic:android-database-sqlcipher:3.5.4@aar' contain these:
packagingOptions {
pickFirst 'lib/armeabi-v7a/libsqlcipher.so'
pickFirst 'lib/arm64-v8a/libsqlcipher.so'
pickFirst 'lib/x86/libsqlcipher.so'
pickFirst 'lib/x86_64/libsqlcipher.so'
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
androidTest {
manifest.srcFile 'androidTest/AndroidManifest.xml'
java.srcDirs = ['androidTest/src']
resources.srcDirs = ['androidTest/src']
aidl.srcDirs = ['androidTest/src']
renderscript.srcDirs = ['androidTest/src']
res.srcDirs = ['androidTest/res']
assets.srcDirs = ['androidTest/assets']
}
}
// before working here, run this in terminal: `make -C external`
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
}
task makeExternal(type: Exec) {
commandLine 'make', '-C', file('external').absolutePath
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn makeExternal
}
task makeExternalClean(type: Exec) {
commandLine 'make', '-C', file('external').absolutePath, 'clean'
}
lintOptions {
abortOnError true
htmlReport false
xmlReport false
textReport true
error 'AppCompatMethod', 'NestedScrolling', 'StringFormatCount', 'UnsafeProtectedBroadcastReceiver'
}
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
options.addStringOption('notimestamp')
failOnError false
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
}