Skip to content

support for publishToMavenLocal #83

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AbhiTheModder
Copy link

Just a proposal, this makes it easier to use in a project without building & including/updating jar file everytime, (for eg. adding as submodule and simply running ./gradlew publishToMavenLocal)

@REAndroid
Copy link
Owner

@AbhiTheModder Sorry I don't know how I didn't see this PR for long.
I have no much information about publish , normally I do publish releases manually (which is painful ) to maven repo. I would love if you explain me a bit more.
Speaking of publish, do you have any idea to avoid using jar binaries on APKEditor ? I tried adding as sub-modules but not continent to manage from shell command.

@AbhiTheModder
Copy link
Author

AbhiTheModder commented Aug 17, 2025

Speaking of publish, do you have any idea to avoid using jar binaries on APKEditor ? I tried adding as sub-modules but not continent to manage from shell command.

While using a submodule isn't strictly necessary (users could clone ARSCLib separately and publish it to their local Maven manually, which would also work after this idea gets accepted), adopting it as a submodule can streamline the process. There might be instances where we forget to clone ARSCLib and run publishToMavenLocal. Adding it as a submodule ensures that after cloning APKEditor we will also update and fetch submodules. Then, within the ARSCLib submodule directory, running ./gradlew publishToMavenLocal will publish the library locally to MavenLocal (storing libraries under $HOME/.m2). This only requires adding one extra dependency resolution repository before MavenCentral in the build script as MavenLocal and removing our manual loading implementation of libs. Afterward, it can be imported as a dependency through implementation,:

instead of implementation("io.github.reandroid:ARSCLib:+") we will do this instead for MavenLocal:

implementation("com.reandroid:ARSCLib:+")

eliminating the need to update a remote Maven repo (though optionally, this can still be done if you wish for people who like MavenCentral) or manually updating libraries.

Here's a small video:

arsclib.mp4

@REAndroid
Copy link
Owner

@AbhiTheModder Thank you! I learned something. As personal hack I place naughty dependencies under $HOME/.m2 but didn't know publishToMavenLocal does the trick.

We can't use implementation("com.reandroid:ARSCLib:+") on APKEditor bc we don't have valid repository.

I think it is complicated for regular users of APKEditor to clone ARSCLib separately.

@REAndroid
Copy link
Owner

I am checking https://central.sonatype.org/publish/publish-portal-snapshots/

@AbhiTheModder
Copy link
Author

AbhiTheModder commented Aug 18, 2025

I think it is complicated for regular users of APKEditor to clone ARSCLib separately.

Agreed, that's why I suggested including it as a submodule and updating the build instructions in the README. Anyway, that's for APKEditor. What I'm proposing here is for ARSCLib is purely for my own (& others if they would prefer MavenLocal) convenience (so you can ignore it if it's not up to your liking<3 ) . This way, I could use the latest updates without relying on jars in my project. Currently, I have to keep this branch of mine updated with upstream just to use it :)

@AbhiTheModder
Copy link
Author

I am checking https://central.sonatype.org/publish/publish-portal-snapshots/

Ouch, that's nice & good for anyone to try for latest changes, but this line there fears me:

Specifically, -SNAPSHOT releases are cleaned up after a period of time (currently 90 days)

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