/
build.gradle
120 lines (115 loc) · 4.26 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
117
118
119
120
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
// See https://developer.android.com/studio/publish/app-signing#secure-shared-keystore
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
signingConfigs {
config {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "app.intra"
minSdkVersion 14
targetSdkVersion 28
versionCode 33
versionName "1.1.3"
vectorDrawables.useSupportLibrary = true
// Fix a build error related to having log4j in the classpath.
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
lintOptions {
// Ignore lint errors in sockslib that we believe are safe to ignore.
baseline file("lint-baseline.xml")
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
resValue("bool", "FIREBASE_ENABLED", "true")
}
debug {
pseudoLocalesEnabled true
resValue("bool", "FIREBASE_ENABLED", "false")
// Split build across multiple dex files. This is necessary mostly because Guava adds
// so many classes that we exceed the dex limit (65536 methods). This does not apply
// to release builds, where unused classes are pruned.
multiDexEnabled true
}
}
testOptions {
unitTests.returnDefaultValues = true
}
sourceSets {
main.java.srcDirs += '../third_party/sockslib/src/main/java/'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
// Two dependencies both populate this file, resulting in a collision at APK-build time.
exclude 'META-INF/DEPENDENCIES'
}
}
repositories {
maven {
url 'test-repo'
}
maven {
url '../gradle-plugin-repo'
}
maven {
url '../firebase-repo'
}
maven {
url '../sockslib-repo'
}
}
dependencies {
// Third-party dependency: OkHttp3
implementation fileTree(include: [
'okhttp-3.12.3.jar', // 3.12.* has branched to support API <21. 3.13+ doesn't.
'okio-1.15.0.jar',
'guava-27.1-android.jar'
], dir: 'libs')
// Third-party test dependencies.
testImplementation 'junit:junit:4.12'
testImplementation 'org.json:json:20171018'
testImplementation 'org.mockito:mockito-core:2.13.0'
// Required for instrumented tests
androidTestImplementation 'androidx.annotation:annotation:1.0.1'
androidTestImplementation 'androidx.test:runner:1.1.1'
// UI libraries.
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.preference:preference:1.0.0'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
// For Firebase Analytics, etc.
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-perf:16.2.5' // Last version to support API <17
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
// For Sockslib
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'org.slf4j:slf4j-android:1.7.25'
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
}
// For Firebase Analytics
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-perf'