Skip to content

Commit

Permalink
Gradle 8.2->8.7, AGP 8.2.2->8.5.0 (yairm210#12325)
Browse files Browse the repository at this point in the history
* Gradle 8.2->8.7, AGP 8.2.2->8.5.0

* *Conditionally* add android project only if ANDROID_HOME is set
  • Loading branch information
yairm210 authored Oct 22, 2024
1 parent 591805b commit a999ba8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
32 changes: 17 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ buildscript {
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${com.unciv.build.BuildConfig.kotlinVersion}")
classpath("com.android.tools.build:gradle:8.2.2")
classpath("com.android.tools.build:gradle:8.5.0")
}
}

Expand Down Expand Up @@ -90,22 +90,24 @@ project(":server") {

}

project(":android") {
apply(plugin = "com.android.application")
apply(plugin = "kotlin-android")
if (System.getenv("ANDROID_HOME") != null) {
project(":android") {
apply(plugin = "com.android.application")
apply(plugin = "kotlin-android")

val natives by configurations.creating
val natives by configurations.creating

dependencies {
"implementation"(project(":core"))
// Not sure why I had to add this in for the upgrade to 1.12.1 to work, we can probably remove this later since it's contained in core
"implementation"("com.badlogicgames.gdx:gdx:$gdxVersion")
"implementation"("com.badlogicgames.gdx:gdx-backend-android:$gdxVersion")
"implementation"("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64")
dependencies {
"implementation"(project(":core"))
// Not sure why I had to add this in for the upgrade to 1.12.1 to work, we can probably remove this later since it's contained in core
"implementation"("com.badlogicgames.gdx:gdx:$gdxVersion")
"implementation"("com.badlogicgames.gdx:gdx-backend-android:$gdxVersion")
"implementation"("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64")
}
}
}

Expand Down
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.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include("desktop", "android", "core", "tests", "server")
include("desktop", "core", "tests", "server")
if (System.getenv("ANDROID_HOME") != null) include("android")

0 comments on commit a999ba8

Please sign in to comment.