-
-
Notifications
You must be signed in to change notification settings - Fork 133
Expand file tree
/
Copy pathbuild.gradle
More file actions
207 lines (164 loc) · 7.11 KB
/
build.gradle
File metadata and controls
207 lines (164 loc) · 7.11 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
apply plugin: 'com.android.application'
apply plugin: 'com.trevjonez.composer'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'de.mobilej.unmock'
repositories {
mavenCentral()
google()
maven { url 'https://www.jitpack.io' }
}
android {
compileSdkVersion 35
defaultConfig {
versionCode 373
versionName "3.7.3"
minSdkVersion 23
targetSdkVersion 33
applicationId "org.ligi.passandroid"
namespace "org.ligi.passandroid"
testInstrumentationRunner "org.ligi.passandroid.AppReplacingRunner"
archivesBaseName = "PassAndroid-$versionName"
vectorDrawables.useSupportLibrary = true
}
flavorDimensions "maps", "analytics", "distribution"
productFlavors {
withMaps {
dimension "maps"
}
noMaps {
dimension "maps"
}
withAnalytics {
dimension "analytics"
}
noAnalytics {
dimension "analytics"
}
forFDroid {
dimension "distribution"
}
forPlay {
dimension "distribution"
}
forAmazon {
dimension "distribution"
}
}
android.variantFilter { variant ->
def maps = variant.getFlavors().get(0).name
def analytics = variant.getFlavors().get(1).name
def distribution = variant.getFlavors().get(2).name
variant.setIgnore((project.hasProperty("singleFlavor") && (distribution != 'forPlay'))
|| ((distribution == 'forAmazon' || distribution == 'forPlay') && analytics == 'noAnalytics')
|| ((distribution == 'forAmazon' || distribution == 'forPlay') && maps == 'noMaps')
|| (distribution == 'forFDroid' && analytics == 'withAnalytics')
|| (distribution == 'forFDroid' && maps == 'withMaps'))
}
packagingOptions {
// needed for assertJ
exclude 'asm-license.txt'
exclude 'LICENSE'
exclude 'NOTICE'
// hack for instrumentation testing :-(
exclude 'LICENSE.txt'
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
exclude 'META-INF/lib_release.kotlin_module'
}
lintOptions {
warning 'MissingTranslation'
warning 'InvalidPackage'
disable "NullSafeMutableLiveData"
baseline file("lint-baseline.xml")
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
debug {
multiDexEnabled true
}
}
buildFeatures {
viewBinding true
buildConfig true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
namespace 'org.ligi.passandroid'
}
dependencies {
implementation 'com.github.permissions-dispatcher:permissionsdispatcher-ktx:4.8.0'
implementation "io.insert-koin:koin-android:3.4.2"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2"
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
androidTestImplementation 'com.github.ligi:trulesk:4.3'
androidTestImplementation 'com.jraska:falcon:2.2.0'
androidTestImplementation 'com.linkedin.testbutler:test-butler-library:2.2.1'
androidTestUtil 'com.linkedin.testbutler:test-butler-app:2.2.1'
androidTestImplementation 'androidx.test:core:1.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.6.1'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.5.1'
androidTestImplementation 'com.squareup.assertj:assertj-android:1.2.0'
androidTestImplementation "org.mockito:mockito-core:$mockito_version"
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.28.4'
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.2'
androidTestImplementation "org.threeten:threetenbp:$threetenbp_version"
androidTestImplementation 'com.android.support:multidex:1.0.3'
implementation 'com.github.ligi:TouchImageView:2.1'
implementation 'com.github.ligi:ExtraCompats:1.0'
implementation 'net.lingala.zip4j:zip4j:2.11.5'
implementation 'com.jakewharton.threetenabp:threetenabp:1.4.6'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.annotation:annotation:1.9.1'
implementation 'androidx.recyclerview:recyclerview:1.4.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.fragment:fragment-ktx:1.6.0'
implementation 'androidx.webkit:webkit:1.12.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'net.i2p.android.ext:floatingactionbutton:1.10.1'
implementation 'com.github.ligi:KAXT:1.0'
implementation 'com.github.ligi:KAXTUI:1.0'
implementation 'com.github.ligi:loadtoast:1.10.11'
implementation 'com.github.ligi:tracedroid:4.1'
implementation 'com.jakewharton.timber:timber:5.0.1'
forPlayImplementation 'com.github.ligi.snackengage:snackengage-playrate:0.30'
forFDroidImplementation 'com.github.ligi.snackengage:snackengage-playrate:0.30'
forAmazonImplementation 'com.github.ligi.snackengage:snackengage-amazonrate:0.30'
// https://medium.com/square-corner-blog/okhttp-3-13-requires-android-5-818bb78d07ce
// Don't update to >=3.13 before minSDK 21 + Java 8
//noinspection GradleDependency
implementation 'com.squareup.okhttp3:okhttp:3.12.12'
implementation 'com.larswerkman:HoloColorPicker:1.5'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'com.squareup.okio:okio:3.6.0'
implementation 'com.squareup.moshi:moshi:1.15.0'
kapt "com.squareup.moshi:moshi-kotlin-codegen:1.15.0"
implementation "com.chibatching.kotpref:kotpref:$kotpref_version"
implementation "com.chibatching.kotpref:initializer:$kotpref_version"
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
testImplementation 'junit:junit:4.13.2'
testImplementation "org.mockito:mockito-core:$mockito_version"
testImplementation "org.threeten:threetenbp:$threetenbp_version"
// https://github.com/ligi/PassAndroid/issues/181
// Don't upgrade before minSDK 19 - or replace zxing
//noinspection GradleDependency
implementation 'com.google.zxing:core:3.3.0'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.14'
// requires minSDK 16 according to docs, not sure if it causes an issue
withAnalyticsImplementation 'com.google.android.gms:play-services-analytics:18.0.2'
withMapsImplementation 'com.google.android.gms:play-services-maps:17.0.0'
}