1
+ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2
+
1
3
/*
2
4
* The contents of this file are subject to the Common Public Attribution License Version 1.0.
3
5
* (the "License"); you may not use this file except in compliance with the License.
@@ -195,8 +197,8 @@ android {
195
197
// Gradle ignores any variants that satisfy the conditions above.
196
198
setIgnore(true )
197
199
}
198
-
199
200
}
201
+
200
202
packagingOptions {
201
203
resources {
202
204
excludes + = [' .readme' ]
@@ -205,8 +207,8 @@ android {
205
207
206
208
// Taken from: https://stackoverflow.com/a/59583066/3969362
207
209
// Needed to customize our APK file name per flavor
208
- applicationVariants. all { variant ->
209
- variant. outputs. all { output ->
210
+ applicationVariants. configureEach { variant ->
211
+ variant. outputs. configureEach { output ->
210
212
// def appId = variant.applicationId// com.exampleFree.app OR com.examplePaid.app
211
213
def versionName = variant. versionName
212
214
// def versionCode = variant.versionCode // e.g 1.0
@@ -239,6 +241,8 @@ android {
239
241
buildFeatures {
240
242
// That should give us both view and data binding
241
243
dataBinding true
244
+ // We notably use build config to define our sponsorships
245
+ buildConfig true
242
246
}
243
247
lint {
244
248
abortOnError true
@@ -388,7 +392,7 @@ kapt {
388
392
}
389
393
}
390
394
391
- tasks. withType(org.jetbrains.kotlin.gradle.tasks. KotlinCompile ). all {
395
+ tasks. withType(KotlinCompile ). configureEach {
392
396
sourceCompatibility = JavaVersion . VERSION_1_8
393
397
targetCompatibility = JavaVersion . VERSION_1_8
394
398
0 commit comments