mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-24 03:53:12 -04:00
fix errors in gradle 9 (#13780)
This commit is contained in:
parent
9d8f2a1814
commit
8f57a480a6
@ -1,8 +1,8 @@
|
||||
|
||||
import com.unciv.build.AndroidImagePacker
|
||||
import com.unciv.build.BuildConfig
|
||||
import java.util.Properties
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
@ -86,7 +86,7 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
task("texturePacker") {
|
||||
tasks.register("texturePacker") {
|
||||
doFirst {
|
||||
logger.info("Calling TexturePacker")
|
||||
AndroidImagePacker.packImages(projectDir.path)
|
||||
@ -96,7 +96,7 @@ task("texturePacker") {
|
||||
// called every time gradle gets executed, takes the native dependencies of
|
||||
// the natives configuration, and extracts them to the proper libs/ folders
|
||||
// so they get packed with the APK.
|
||||
task("copyAndroidNatives") {
|
||||
tasks.register("copyAndroidNatives") {
|
||||
val natives: Configuration by configurations
|
||||
|
||||
doFirst {
|
||||
@ -135,17 +135,16 @@ private fun getSdkPath(): String? {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register<JavaExec>("run") {
|
||||
tasks.register<Exec>("run") {
|
||||
standardOutput = System.out
|
||||
errorOutput = System.err
|
||||
isIgnoreExitValue = false
|
||||
|
||||
val path = getSdkPath()
|
||||
val adb = "$path/platform-tools/adb"
|
||||
|
||||
doFirst {
|
||||
project.exec {
|
||||
commandLine(adb, "shell", "am", "start", "-n", "com.unciv.app/AndroidLauncher")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("androidx.core:core-ktx:1.15.0")
|
||||
|
Loading…
x
Reference in New Issue
Block a user