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.AndroidImagePacker
|
||||||
import com.unciv.build.BuildConfig
|
import com.unciv.build.BuildConfig
|
||||||
import java.util.Properties
|
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
import java.util.Properties
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
@ -86,7 +86,7 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task("texturePacker") {
|
tasks.register("texturePacker") {
|
||||||
doFirst {
|
doFirst {
|
||||||
logger.info("Calling TexturePacker")
|
logger.info("Calling TexturePacker")
|
||||||
AndroidImagePacker.packImages(projectDir.path)
|
AndroidImagePacker.packImages(projectDir.path)
|
||||||
@ -96,7 +96,7 @@ task("texturePacker") {
|
|||||||
// called every time gradle gets executed, takes the native dependencies of
|
// called every time gradle gets executed, takes the native dependencies of
|
||||||
// the natives configuration, and extracts them to the proper libs/ folders
|
// the natives configuration, and extracts them to the proper libs/ folders
|
||||||
// so they get packed with the APK.
|
// so they get packed with the APK.
|
||||||
task("copyAndroidNatives") {
|
tasks.register("copyAndroidNatives") {
|
||||||
val natives: Configuration by configurations
|
val natives: Configuration by configurations
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
@ -135,16 +135,15 @@ private fun getSdkPath(): String? {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<JavaExec>("run") {
|
tasks.register<Exec>("run") {
|
||||||
|
standardOutput = System.out
|
||||||
|
errorOutput = System.err
|
||||||
|
isIgnoreExitValue = false
|
||||||
|
|
||||||
val path = getSdkPath()
|
val path = getSdkPath()
|
||||||
val adb = "$path/platform-tools/adb"
|
val adb = "$path/platform-tools/adb"
|
||||||
|
|
||||||
doFirst {
|
commandLine(adb, "shell", "am", "start", "-n", "com.unciv.app/AndroidLauncher")
|
||||||
project.exec {
|
|
||||||
commandLine(adb, "shell", "am", "start", "-n", "com.unciv.app/AndroidLauncher")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user