Gradle 8.2, remove all IOS references due to robovm bug (which we don't use)

This commit is contained in:
Yair Morgenstern 2024-01-28 12:35:29 +02:00
parent 1318cfdc4a
commit 52a9eebe28
43 changed files with 26 additions and 304 deletions

View File

@ -73,7 +73,10 @@ android {
// Don't add local save files and fonts to release, obviously // Don't add local save files and fonts to release, obviously
ignoreAssetsPattern = "!SaveFiles:!fonts:!maps:!music:!mods" ignoreAssetsPattern = "!SaveFiles:!fonts:!maps:!music:!mods"
} }
buildToolsVersion = "33.0.2" buildFeatures {
renderScript = true
aidl = true
}
} }
task("texturePacker") { task("texturePacker") {

View File

@ -5,6 +5,7 @@ import android.app.ActivityManager
import android.content.Context import android.content.Context
import android.os.Build import android.os.Build
import android.util.Log import android.util.Log
import com.badlogic.gdx.backends.android.BuildConfig
import com.unciv.utils.LogBackend import com.unciv.utils.LogBackend
import com.unciv.utils.Tag import com.unciv.utils.Tag

View File

@ -3,7 +3,6 @@ import com.unciv.build.BuildConfig.coroutinesVersion
import com.unciv.build.BuildConfig.gdxVersion import com.unciv.build.BuildConfig.gdxVersion
import com.unciv.build.BuildConfig.kotlinVersion import com.unciv.build.BuildConfig.kotlinVersion
import com.unciv.build.BuildConfig.ktorVersion import com.unciv.build.BuildConfig.ktorVersion
import com.unciv.build.BuildConfig.roboVMVersion
// You'll still get kotlin-reflect-1.3.70.jar in your classpath, but will no longer be used // You'll still get kotlin-reflect-1.3.70.jar in your classpath, but will no longer be used
@ -25,8 +24,7 @@ buildscript {
} }
dependencies { dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${com.unciv.build.BuildConfig.kotlinVersion}") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${com.unciv.build.BuildConfig.kotlinVersion}")
classpath("com.android.tools.build:gradle:7.4.2") classpath("com.android.tools.build:gradle:8.2.2")
classpath("com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1")
} }
} }
@ -113,19 +111,6 @@ project(":android") {
} }
} }
project(":ios") {
apply(plugin = "kotlin")
apply(plugin = "robovm")
dependencies {
"implementation"(project(":core"))
"implementation"("com.mobidevelop.robovm:robovm-rt:$roboVMVersion")
"implementation"("com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion")
"implementation"("com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion")
"implementation"("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios")
}
}
project(":core") { project(":core") {
apply(plugin = "kotlin") apply(plugin = "kotlin")

View File

@ -10,5 +10,4 @@ object BuildConfig {
const val gdxVersion = "1.12.1" const val gdxVersion = "1.12.1"
const val ktorVersion = "2.2.3" const val ktorVersion = "2.2.3"
const val coroutinesVersion = "1.7.2" const val coroutinesVersion = "1.7.2"
const val roboVMVersion = "2.3.1"
} }

View File

@ -8,3 +8,10 @@ sourceSets {
java.srcDir("src/") java.srcDir("src/")
} }
} }
kotlin {
jvmToolchain(11)
}
java {
targetCompatibility = JavaVersion.VERSION_11
}

View File

@ -11,6 +11,13 @@ sourceSets {
} }
} }
kotlin {
jvmToolchain(11)
}
java {
targetCompatibility = JavaVersion.VERSION_11
}
dependencies { dependencies {
// See https://libgdx.com/news/2021/07/devlog-7-lwjgl3#do-i-need-to-do-anything-else // See https://libgdx.com/news/2021/07/devlog-7-lwjgl3#do-i-need-to-do-anything-else
api("com.badlogicgames.gdx:gdx-lwjgl3-glfw-awt-macos:$gdxVersion") api("com.badlogicgames.gdx:gdx-lwjgl3-glfw-awt-macos:$gdxVersion")

View File

@ -21,8 +21,7 @@ By the end of this guide, you will have Unciv running locally from code, so you
(Optionally, you can save some space by selecting 'Show Package Details' and choosing the Platform SDK only, without Sources or system Images) (Optionally, you can save some space by selecting 'Show Package Details' and choosing the Platform SDK only, without Sources or system Images)
- Click "SDK Tools" - Click "SDK Tools"
- Select "Show Package Details" in the bottom right - Select "Show Package Details" in the bottom right
- Choose version 33.0.2 under "Android SDK Build-Tools" - Choose version 34.0.0 under "Android SDK Build-Tools"
![image](/Unciv/assets/Android_SDK_Tools.png)
- Click "Apply" - Click "Apply"
- Restart Android Studio - Restart Android Studio
- In Android Studio, Run > Edit configurations (be sure the Gradle sync is finished successfully first). - In Android Studio, Run > Edit configurations (be sure the Gradle sync is finished successfully first).

View File

@ -2,4 +2,6 @@ android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
org.gradle.parallel=true org.gradle.parallel=true
org.gradle.caching=true org.gradle.caching=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=512m org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=512m
android.nonTransitiveRClass=false
android.nonFinalResIds=false

View File

@ -1,6 +1,6 @@
#Mon Feb 06 15:51:42 CST 2023 #Mon Feb 06 15:51:42 CST 2023
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${app.name}</string>
<key>CFBundleExecutable</key>
<string>${app.executable}</string>
<key>CFBundleIdentifier</key>
<string>${app.id}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${app.name}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${app.version}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${app.build}</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>opengles-2</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleIconName</key>
<string>AppIcon</string>
</dict>
</plist>

View File

@ -1,35 +0,0 @@
import com.android.build.gradle.internal.tasks.factory.dependsOn
import com.unciv.build.BuildConfig
sourceSets {
main {
java.srcDir("src/")
}
}
tasks {
compileJava {
options.encoding = "UTF-8"
}
compileTestJava {
options.encoding = "UTF-8"
}
}
extra.set("mainClassName", "IOSLauncher")
tasks {
launchIPhoneSimulator.dependsOn(build)
launchIPadSimulator.dependsOn(build)
launchIOSDevice.dependsOn(build)
createIPA.dependsOn(build)
}
robovm {
archs = "thumbv7:arm64"
}
eclipse.project {
name = "${BuildConfig.appName}-ios"
natures("org.robovm.eclipse.RoboVMNature")
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

View File

@ -1,116 +0,0 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "iphone-notification-icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "iphone-notification-icon-20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "iphone-spotlight-settings-icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "iphone-spotlight-settings-icon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "iphone-spotlight-icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "iphone-spotlight-icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "iphone-app-icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "iphone-app-icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "ipad-notifications-icon-20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "ipad-notifications-icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "ipad-settings-icon-29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "ipad-settings-icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "ipad-spotlight-icon-40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "ipad-spotlight-icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "ipad-app-icon-76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "ipad-app-icon-76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "ipad-pro-app-icon-83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "app-store-icon-1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,6 +0,0 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -1,6 +0,0 @@
app.version=1.0
app.id=com.mygdx.game
app.mainclass=com.unciv.game.IOSLauncher
app.executable=IOSLauncher
app.build=1
app.name=my-gdx-game

View File

@ -1,47 +0,0 @@
<config>
<executableName>${app.executable}</executableName>
<mainClass>${app.mainclass}</mainClass>
<os>ios</os>
<arch>thumbv7</arch>
<target>ios</target>
<iosInfoPList>Info.plist.xml</iosInfoPList>
<resources>
<resource>
<directory>../android/assets</directory>
<includes>
<include>**</include>
</includes>
<skipPngCrush>true</skipPngCrush>
</resource>
<resource>
<directory>data</directory>
</resource>
</resources>
<forceLinkClasses>
<pattern>com.badlogic.gdx.scenes.scene2d.ui.*</pattern>
<pattern>com.badlogic.gdx.graphics.g3d.particles.**</pattern>
<pattern>com.android.okhttp.HttpHandler</pattern>
<pattern>com.android.okhttp.HttpsHandler</pattern>
<pattern>com.android.org.conscrypt.**</pattern>
<pattern>com.android.org.bouncycastle.jce.provider.BouncyCastleProvider</pattern>
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.BC$Mappings</pattern>
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi</pattern>
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$Std</pattern>
<pattern>com.android.org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi</pattern>
<pattern>com.android.org.bouncycastle.crypto.digests.AndroidDigestFactoryOpenSSL</pattern>
<pattern>org.apache.harmony.security.provider.cert.DRLCertFactory</pattern>
<pattern>org.apache.harmony.security.provider.crypto.CryptoProvider</pattern>
</forceLinkClasses>
<libs>
<lib>z</lib>
</libs>
<frameworks>
<framework>UIKit</framework>
<framework>OpenGLES</framework>
<framework>QuartzCore</framework>
<framework>CoreGraphics</framework>
<framework>OpenAL</framework>
<framework>AudioToolbox</framework>
<framework>AVFoundation</framework>
</frameworks>
</config>

View File

@ -1,21 +0,0 @@
package com.unciv.app;
import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.uikit.UIApplication;
class IOSLauncher extends IOSApplication.Delegate {
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new com.unciv.UncivGame(), config);
}
public static void main(String[] argv) {
NSAutoreleasePool pool = new NSAutoreleasePool();
UIApplication.main(argv, null, IOSLauncher.class);
pool.close();
}
}

View File

@ -1 +1 @@
include("desktop", "android", "ios", "core", "tests", "server") include("desktop", "android", "core", "tests", "server")