-
Notifications
You must be signed in to change notification settings - Fork 110
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
Infer artifactId and groupId from git url #52
Comments
* Jitpack provides the correct version from git tags. They might block certain git functionality as they deem it not safe. |
We should dig a bit deeper to guard against cyclic dependencies. Gradle will resolve all dependencies including cyclic ones and choose the most up-to-date version for each. But it only considers artifacts for conflicts with the same group and artifact I'd. Example A:
Will be reduced to [email protected] Example B:
Will import both dependencies are those are deemed separate. That is the inherent danger of Jitpack. It will quickly break builds if you mix up forks! Anyway, if the current project (for example GalacticGregGT5) is included transitively by a circular dependency, the Gradle properties |
I am much more in favour of using the proper |
Publishing with same group on jitpack is illegal and doesn't make much sense. Its a responsibility of repo owner to make sure they won't have forks in the projects. The simple reason of it being illegal - you don't own original forge gradle repo and can't post under their name new versions. I suggest putting a simple guard which will check artifact ides, since they should not change (don't remember seeing case where some repo was forked and then renamed). |
Using
git remote get-url origin
we can get url like[email protected]:TheElan/org-build-system-updater.git
, from it a groupId can be extracted asgithub.com:TheElan -> github.com.TheElan
and name asorg-build-system-updater as artifactId
This way we are both compliant with jitpack scheme on other maven as well as locally without a need to setup it manually for each project. This would also work nicely with forks.
The only problem I can see here is jitpack building behavior. It looks like it doesn't clone but copy files, which means there is no git repo when it's building, might need to find some workaround either changing smth in
jitpack.yml
.The text was updated successfully, but these errors were encountered: