Closed mikehardy closed 3 years ago
Awesome thanks for this!
NP - thanks for keeping this thing going so long, and hopefully this makes that easier, as mentioned elsewhere I have a library in mavenCentral() and while that's cool and all it was time I didn't have in order to get it set up :-).
We have an alpha of AnkiDroid built using my forked-temporary-proof-of-concept dependency already and it all worked using GitHub Actions to do the build and release, so I'd say it's not a science fair project, it appears "good to go" to me, just requires your "release" process now to be tagging the code with a version number any time you want people to be able to use jitpack as their maven repo, and then (as a courtesy) you should probably try to fetch the tag once so that it builds :)
Heck, that's probably all doable in a github action as well - I think they can listen to push events, see if it is a tag, and then curl
the .pom for the new tag to kick off the build, could sleep for 15 minutes, curl the build log and make sure it was a success?
If anyone is interested in hacking that together :-), otherwise just push a tag and will work...
@mikehardy thanks for contributing this, especially looking at the upcoming deprecation of Bintray.
@M66B exactly why I was doing it :-), this was the last dependency I had stopping me from removing jcenter()
maven repo in one of my apps, and I know open source repository maintainership is hard to move up on the priority list plus publishing on mavenCentral is a pain in the butt I was guessing @npurushe wasn't looking forward to ;-). With this it just needs to be merged (with correct version for next release), tagged with current sqlite version and...done
@npurushe since there were a number bugs fixed in the latest sqlite sub versions, so you might want to jump to version 3.35.4:
https://www.sqlite.org/changes.html
Let me thank you, like @mikehardy, for keeping this useful repository up to date! This doesn't mean there is a rush to update to the latest version now, although it would be welcome to me because I can finally remove some unused columns without doing a risky alterations of the database schema. This is not a big deal in any case, more a nice to have.
I merged a prior PR that bumps the version to 3.35.4 and also removed the old bintray publish. Can you merge those changes into this? then will merge this PR thanks!
Yes, and I just realized I need to update the docs as well (the README.md, that is) I will merge those changes and an update to the docs so that it should be perfect for a 3.35.4 tag, test it on my fork, and if jitpack builds it right, it will be possible to just merge it here and tag it and we can all move on with our lives :-)
I've made all the changes in one clean commit that should be ready to merge.
jitpack.io is still building the tag on my fork to confirm it's :100: but it looks good so far - you should confirm prior to merge by making sure the log looks right
One "gotcha" with this is that if you forget to git push --tags
to actually send the tag up to github.com, then jitpack.io can't see it to build it. So don't be like me and forget to push the tags then wonder why it's not building :clown_face:
Once the tag is up though, any attempt to access https://jitpack.io/com/github/requery/sqlite-android/<version>
will trigger the build of <version>
at which point you may actually watch it the build output in real time (takes about 10mins) at https://jitpack.io/com/github/requery/sqlite-android/<version>/build.log
Since I obviously have the URLs handy already, let's make that concrete and clickable
1- post merge make a tag of 3.35.1
however you prefer
2- click https://jitpack.io/com/github/requery/sqlite-android/3.35.4
3- click here to watch build https://jitpack.io/com/github/requery/sqlite-android/3.35.4/build.log
4- profit
Oh wait, scratch that. I wasn't expecting any of the changes from your previous merges to break things but something did.
* What went wrong:
Execution failed for task ':sqlite-android:publishMavenPublicationToMavenLocal'.
> Failed to publish publication 'maven' to repository 'mavenLocal'
> Invalid publication 'maven': POM file is invalid. Check any modifications you have made to the POM file.
Investigating.
Okay, I had to revert your maven publishing changes @npurushe - apologies, they simply did not work for jitpack because it won't have the local properties file and it fails, plus something about that POM definition did not work. However, you can read the generated POM with that block commented out and it's got what you want in there...
This commit built successfully, and is ready for merge:
It includes documentation updates to use the jitpack reference, and I forward-ported the build file to gradle 7 for you ;-) (I just had to do that for AnkiDroid so you get my learnings free! what a bargain)
I won't have any more time really to go back and forth on this so I annotated the full diff with explanations of everything. Hopefully it's good and can merge or I'll just use my fork for now. It's busy times handling the jcenter thing across a few ecosystems...
Sorry that change caused an issue with this PR i'll investigate what went wrong, thanks!
Yeah, it seemed innocuous, I was surprised it did not just go first time!
I just merged your changes from master in to here (I had simply commented the same lines you removed so took 2 secs) may still be good to go :-) ?
sounds good merging your PR to master and will try the jitpack version in a test app, thanks!
It looks good! https://jitpack.io/com/github/requery/sqlite-android/master-0b4d5508cc-1/build.log
just needs a tag on that commit hash and it's a good build, easy to integrate - I've test integrated with AnkiDroid from a build that did all the important (and otherwise untouched) bits (download + compile + link) the same so I've got high confidence in that part,
Great! added a tag for version 3.35.4
The repository was suprisingly close to working on jitpack
Fixes #140
https://jitpack.io/com/github/mikehardy/sqlite-android/3.35.1.1/build.log
Takes about 10 minutes for jitpack to build the artifact starting from the first time someone requests it.
You can already depend on this artifact and try it if you like: