AndroidManifest settings in project.xml possible? (openfl 4.3)

Is it possible to set “supports-screens”, “uses-feature” or the versionCode, directly in the project.xml instead of overwriting the Androidmanifest?

Coming from openfl 3 to 4.3 i adjusted the path of the overwritten AndroidManifest.
But still, my android:versionCode is ignored.
Also the resulting apk has a generic name (app-release.apk), instead of “ProjectName”-release.apk.
The rest seems fine, still it would be nicer without the need of overwriting the manifest.

Lime’s template is designed to include only the essentials, so no. The idea is that if you need more advanced features, you’ll make a template.

Try this:

<app buildNumber="12345" />

Is the new path app/src/main/AndroidManifest.xml?

Lime will rename it for you, but only if you use the test or run command. If that isn’t good enough, @Restorer might know how to set it through Gradle.

1 Like

In case you want to rename it using gradle:

android {
    ...

    android.applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def outputFile = output.outputFile

            if (outputFile != null && outputFile.name.endsWith('.apk')) {
                output.outputFile = new File(outputFile.parent, "YourAppName-" + variant.baseName + ".apk")
            }
        }
    }
}

Thanks! I wasn’t sure how to do that, or I’d have set it up that way in the first place. I’ve now submitted a pull request.

These changes have been merged, thanks