Skip to content

Commit

Permalink
Fix some Gradle warnings
Browse files Browse the repository at this point in the history
Show all warnings to help migrate to Gradle 9.
  • Loading branch information
Slion committed Jan 10, 2025
1 parent 97c7c8a commit 487ff48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

/*
* The contents of this file are subject to the Common Public Attribution License Version 1.0.
* (the "License"); you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -195,8 +197,8 @@ android {
// Gradle ignores any variants that satisfy the conditions above.
setIgnore(true)
}

}

packagingOptions {
resources {
excludes += ['.readme']
Expand All @@ -205,8 +207,8 @@ android {

// Taken from: https://stackoverflow.com/a/59583066/3969362
// Needed to customize our APK file name per flavor
applicationVariants.all { variant ->
variant.outputs.all { output ->
applicationVariants.configureEach { variant ->
variant.outputs.configureEach { output ->
//def appId = variant.applicationId// com.exampleFree.app OR com.examplePaid.app
def versionName = variant.versionName
//def versionCode = variant.versionCode // e.g 1.0
Expand Down Expand Up @@ -239,6 +241,8 @@ android {
buildFeatures {
// That should give us both view and data binding
dataBinding true
// We notably use build config to define our sponsorships
buildConfig true
}
lint {
abortOnError true
Expand Down Expand Up @@ -388,7 +392,7 @@ kapt {
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
tasks.withType(KotlinCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4096M -Dkotlin.daemon.jvm.options\="-Xmx4096M" -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
android.useAndroidX=true
kotlin.incremental=false
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
# Show all warnings to help migrating to Gradle 9
org.gradle.warning.mode=all

# Those guys seems to be useful to debug kapt issues
# See: https://youtrack.jetbrains.com/issue/KT-40750
Expand Down

0 comments on commit 487ff48

Please sign in to comment.