Android manifest update
this moves the Android Manifest to the more Default Location for the plugins
and enables manifest-merger goal.
This sets the VersionName and generates the VersionCode from it
@Agetian maybe you know why on github we don't need to mess with the d8 file?
@Agetian maybe you know why on github we don't need to mess with the d8 file?
Hmm, not sure tbh, I haven't investigated the Github way of doing things as far as building and deploying an Android snapshot goes ^^;
@Agetian can you look to replace
Forge.CURRENT_VERSION in there:
https://github.com/Card-Forge/forge/blob/e2f4c2cfa7a551a215192334bdfc7cfed677b01d/forge-gui-mobile/src/forge/Forge.java#L57
BuildInfo.getVersionString ?
https://github.com/Card-Forge/forge/blob/e2f4c2cfa7a551a215192334bdfc7cfed677b01d/forge-core/src/main/java/forge/util/BuildInfo.java#L35
that is one of the last pieces where the Version needs to be updated
Hmm, getVersionString simply returns "GIT" for me (on a snapshot version), with the entire BuildInfo.class.getPackage() method returning "null"... Not sure if it would return a proper version string if executed on an actual release. At any rate, kinda confusing for snapshots as such. I wonder if there's a better way to track the number, hmm...
Hmm, getVersionString simply returns "GIT" for me (on a snapshot version), with the entire BuildInfo.class.getPackage() method returning "null"... Not sure if it would return a proper version string if executed on an actual release. At any rate, kinda confusing for snapshots as such. I wonder if there's a better way to track the number, hmm...
Normally, maven should have put the version inside these Manifest files so it can be accessed by getPackage()
I need to check what is missing
I think we need https://maven.apache.org/shared/maven-archiver/examples/manifest.html
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
i will check this out at weekend
Sounds good!
@Agetian the addDefaultImplementationEntries should already be enabled by default
when i run ./forge.sh i already got the correct Forge Version
As for the Android thing, i tried:
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ mvn -U -B -P android-debug install -Dsign.keystore=forge.keystore -Dsign.alias=Forge -Dandroid.sdk.path=/opt/android-sdk/ -T 1C -DskipTests=true
and i get:
[ERROR] Failed to execute goal com.simpligility.maven.plugins:android-maven-plugin:4.6.1:manifest-merger (update-manifest) on project forge-gui-android: Execution update-manifest of goal com.simpligility.maven.plugins:android-maven-plugin:4.6.1:manifest-merger failed: FeatureName must follow [a-zA-Z0-9][a-zA-Z0-9_]* regex, found -> [Help 1]
but i can't find where the problem is happening (it is difficult to debug inside the maven plugin)
This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed
Linked Issue that is causing the problem: https://github.com/simpligility/android-maven-plugin/issues/814