Skip to content

Commit

Permalink
chore(agp): migrate AGP 8 and gradle 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mcatta committed Oct 14, 2023
1 parent 3bb2823 commit 6c66124
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 10 deletions.
4 changes: 4 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ android {
versionName = "1.2.2"
}

buildFeatures {
buildConfig = true
}

buildTypes {
release {
signingConfig = signingConfigs.getByName("release")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal class AndroidAppConvention : BuildConvention {

ext.compileSdk = AndroidConfigs.COMPILE_SDK

ext.packagingOptions {
ext.packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import sleep.buildtools.utils.libsCatalog

internal class AndroidComposeConvention : BuildConvention {
override fun apply(target: Project) {
target.extensions.configure<CommonExtension<*, *, *, *>> { ext ->
target.extensions.configure<CommonExtension<*, *, *, *, *>> { ext ->
ext.buildFeatures {
compose = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal class AndroidConvention : BuildConvention {
}
}

target.extensions.configure<CommonExtension<*, *, *, *>> { ext ->
target.extensions.configure<CommonExtension<*, *, *, *, *>> { ext ->
ext.compileSdk = AndroidConfigs.COMPILE_SDK

ext.defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ internal class AndroidLibraryConvention : BuildConvention {
}

ext.defaultConfig {
targetSdk = AndroidConfigs.TARGET_SDK
minSdk = AndroidConfigs.MIN_SDK
testInstrumentationRunner = AndroidConfigs.TEST_INSTRUMENTATION_RUNNER
vectorDrawables.useSupportLibrary = true
Expand Down
4 changes: 4 additions & 0 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ plugins {
android {
namespace 'dev.marcocattaneo.sleep.data'

buildFeatures {
buildConfig = true
}

defaultConfig {
buildConfigField("String", "BASE_URL", "\"https://europe-west2-sleep-app-mobile.cloudfunctions.net/\"")
}
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ org.gradle.daemon=true
org.gradle.caching=true
# Config
sleep.jvm.version=11
sleep.jvm.warning-as-error=false
sleep.jvm.warning-as-error=false
android.nonTransitiveRClass=false
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ coroutine = "1.6.4"
detekt = "1.21.0"
mockk = "1.12.5"
accompanist = "0.25.1"
androidGradlePlugin = "7.4.2"
androidGradlePlugin = "8.1.2"
jacoco = "0.8.8"

[libraries]
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 4 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down

0 comments on commit 6c66124

Please sign in to comment.