Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android manifest update #4977

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Android manifest update #4977

wants to merge 1 commit into from

Conversation

Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Apr 7, 2024

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
Agetian previously approved these changes Apr 7, 2024
@Hanmac
Copy link
Contributor Author

Hanmac commented Apr 8, 2024

@Agetian maybe you know why on github we don't need to mess with the d8 file?

@Agetian
Copy link
Contributor

Agetian commented Apr 8, 2024

@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 ^^;

@Hanmac
Copy link
Contributor Author

Hanmac commented Apr 26, 2024

@Agetian can you look to replace

Forge.CURRENT_VERSION in there:

public static final String CURRENT_VERSION = "1.6.63-SNAPSHOT";

BuildInfo.getVersionString ?

public static final String getVersionString() {

that is one of the last pieces where the Version needs to be updated

@Agetian
Copy link
Contributor

Agetian commented Apr 26, 2024

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...

@Hanmac
Copy link
Contributor Author

Hanmac commented Apr 26, 2024

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

@Hanmac
Copy link
Contributor Author

Hanmac commented Apr 26, 2024

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

@Agetian
Copy link
Contributor

Agetian commented Apr 26, 2024

Sounds good!

@Hanmac
Copy link
Contributor Author

Hanmac commented Apr 27, 2024

@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)

Copy link

This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed

@Hanmac Hanmac added keep no stale and removed no-pr-activity labels Jun 12, 2024
@Hanmac
Copy link
Contributor Author

Hanmac commented Jun 12, 2024

Linked Issue that is causing the problem:
simpligility/android-maven-plugin#814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants