Happy new year and hope you enjoy this release with lots of exciting updates!
This release brings support of lots of Java 8+ APIs!
Breaking changes
Need to refresh the xcode project settings through Inject/Refresh Xcode Project Settings option in Android Studio/Intellij, or with the moeUpdateXcodeSettings gradle task.
Changes to the return type of the new_objc() & allocWithZone() methods could lead to incompatibility issue with user binding classes. You may need to regenerate bind classes.
Name of some of the gradle tasks have been updated
Changelog
SDK changes
Add lots of frequently used Java 8+ APIs, including (but not limited to):
java.util.stream
java.util.function
java.time
java.nio.file
Recent additions to java.util.{Map,Collection,Comparator}
Optionals
Add org.moe.MOE.Build class with following constants:
boolean DEBUG: whether the app is built with debug mode
String PLATFORM_NAME: the app platform, “iphoneos” or “iphonesimulator”
boolean IS_SIMULATOR: whether it’s running in simulator
Updated API binding to iOS 15.3 SDK
Deprecated iOS APIs are marked properly
Locale.getDefault() now returns the same value as NSLocale.currentLocale()
Gradle plugin changes
Remove retrolambda
Allow disable proguard shrinking
Allow enable proguard obfuscation
Allow excluding files & classes completely
Allow specifying different proguard configurations for debug & release mode
Allow specifying build arch when launching app
Improve app shrinking config so less manual configuration is needed when enable shrinking
More improvements and bug fixes
Install / Upgrade
Simply change you build script to use the new plugin and SDK:
I updated project and bindings but I am getting next error when trying to run the app:
“Cannot run Project.afterEvaluate(Action) when the project is already evaluated”.
I did update to the latest XCode 13.3 and do face some issues. Does anyone know how to disable proguard shrinking? Update: it’s not the proGuard part, it seems to be something different, so i’ll copy the log entries from Build process and push them on pastebin.
But does anyone face similar issues with the latest XCode?error.xcode13_3.moe_log.txt (25.7 KB)
Hello @Berstanio, when you write build from source, do you also mean i have to build the natives too?
Because, did download your project, tried to call gradle natives and the i get an error.
Do i have to create the natives my own?
What prerequisites are necessary for this?
As a note, it is probably better to not delete the “custom.xconfig” file. Just keep the generation, but let “-Wl,-all_load” be the only “LIBGDX_NATIVES” content.
Also you should fix the build.gradle copying first, after that you can easily add the xcframeworks to XCode.
Hello @Berstanio, i realized the nightlies changed and found something in nexus, so i ll give it a try and come back to you soon. The only thing i do worry about is that your libgdx “…branch is 39 commits ahead, 217 commits behind libgdx/libgdx:master.” But it will be fine, as long i do need to be able to compile my ios stuff !
@Noisyfox@Andrii_Meretskyi@Berstanio were you able to resolve “Cannot run Project.afterEvaluate(Action) when the project is already evaluated” with MOE 1.9.0? Any clues?
I’m running it on Java 8 and Gradle 7.0.2:
org.gradle.api.InvalidUserCodeException: Cannot run Project.afterEvaluate(Action) when the project is already evaluated.
at org.gradle.api.internal.project.DefaultProject.failAfterProjectIsEvaluated(DefaultProject.java:1043)
at org.gradle.api.internal.project.DefaultProject.afterEvaluate(DefaultProject.java:1024)
at org.moe.gradle.tasks.ResourcePackager.create(ResourcePackager.java:105)
at org.moe.gradle.tasks.ResourcePackager.lambda$addRule$0(ResourcePackager.java:73)
at org.moe.gradle.tasks.AbstractBaseTask$2.doCall(AbstractBaseTask.java:272)
at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...