Skip to content

Android Gradle 9 support - #2096

Open
IriySoft wants to merge 2 commits into
openfl:developfrom
IriySoft:android-gradle-9
Open

Android Gradle 9 support#2096
IriySoft wants to merge 2 commits into
openfl:developfrom
IriySoft:android-gradle-9

Conversation

@IriySoft

@IriySoft IriySoft commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This PR allows using Gradle version 9+ and changes the way the .apk and .aab files are renamed during the build.

Details:

  • classpath 'org.apache.groovy:groovy-swing:+' added to top-level build.gradle because it's not included by default in Gradle 9+
  • for the builds that use Gradle versions lower than 9 the renaming code is replaced with setProperty("archivesBaseName", "::APP_FILE::") that also enables renaming .aab in addition to .apk in the app-level build.gradle
  • for the builds that use Gradle 9+ the renaming is done with the following code in the app-level build.gradle
base {
	archivesName = "::APP_FILE::"
}

Warning!

  • When I switched to Gradle 9+, I had to increase Java heap size with org.gradle.jvmargs=-Xmx2048m in gradle.properties, otherwise the build started to crash with "Out of memory" exception. The reason can be in the Appodeal SDK though that includes dozens of packages.
  • Additionally I had to rebuild Lime / Android, before that the apps crashed on startup, but most probably it's because I'm using the dev branch and didn't rebuild it for quite some time...

@IriySoft IriySoft changed the title Android gradle 9 Android Gradle 9 support Sep 4, 2026
@MRK2009

MRK2009 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

OH YES PLEASE!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants