Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Feature/#1776 build tech upgrades/build process improvements#1793

Merged
spyhunter99 merged 22 commits intomasterfrom
feature/#1776
May 5, 2022
Merged

Feature/#1776 build tech upgrades/build process improvements#1793
spyhunter99 merged 22 commits intomasterfrom
feature/#1776

Conversation

@spyhunter99
Copy link
Copy Markdown
Collaborator

@spyhunter99 spyhunter99 commented Apr 20, 2022

Many have complained...and with good reason... for osmdroid's relatively ancient configuration for android build technologies. Including but not limited to:

  • Android Gradle Plugin (AGP)
  • Android Support libraries
  • Gradle build system
  • Android studio support

The primary reasons for not upgrading where the following

  • We publish to oss.sonatype.org....i.e. maven central, which has the following requirements
  • Javadocs and source jars
  • Near fully populated POMs
  • GPG digital signatures on everything above
  • Hashes on everything above

In addition, osmdroid has a few other unique requirements

  • We have javadocs with extra content in them (doc-files)
  • Probably others

I've spent several long nights trying to get the latest AGP + Gradle to do everything we need it to do and failed. However...there is a happy story here. Most of the build tech that was previously in gradle fury was written in plain java so I was able to come up with a configuration and build process to satisfy all our requirements.

The release process, assuming this is merged, is follows:

  • create a master key for encrypting passwords, just like before
  • encrypt your nexus password, just like before and store in local.properties
  • update an version numbers as needed in gradle.properties, just like before
  • git comment, just like before
  • release.bat
  • update an version numbers as needed in gradle.properties, just like before
  • git comment, just like before
  • upload the distribution to github releases, just like before

What's in release.bat?

  • gradlew clean build publishToMavenLocal
  • build our release helper (with maven)
  • run the release helper

What does the release helper do?

  • gathers the release artifacts from your local .m2/repository folder
  • inject the javadoc stuff
  • fix the poms
  • sign the artifacts
  • hash them
  • push to maven central
  • build the dist zip

Could the release helper be reworked to be in gradle?

  • yes, but that'll be someone else's problem

What open issues are left?

  • at least one unit test was disabled, failure caused by unknown reasons
  • i recall at least one generated class reference that was disabled, need to revisit it
  • lots of warnings caused the build system about deprecated whatevers
  • probably more lint errors
  • some dependencies in the main app are flagged by android studio as incompatible but it seems to build ok?
  • could use some help testing the apks with connectedCheck
  • add back the gradle task to encrypt passwords and to generate a master key
  • third party + Google wrapper app?

Any other changes?

  • Gradle site support was dropped
  • Any direct references to gradle fury dropped

alsutton and others added 13 commits March 19, 2021 08:47
- dist zip is not hooked up
- maven central publishing definitely needs to be redone, from scratch
- mil-sym-android was on bintray but that is dead now, so if you attempt to build this branch, you'll check to check out and build that repo
updates 2525 renderer to a version that is on central
…OR AAR's ONLY)

caveats, dependency declarations in the poms are done by parsing build.gradle files which is super risky considering the massive variations for writing them. exclusions aren't applied yet
…curity issues identifed by sonatype lift when publishing thus the many dependency updates. At this point, i think it's good enough for PR and hopefully for some assistance to resolving the on device unit testing stuff that's broken and the one or two unit tests that stopped working and is now commented out. Wiki release procedure document needs to be updated as well
@spyhunter99
Copy link
Copy Markdown
Collaborator Author

@alsutton @hannesa2 you both have spent a great deal of time working on similar issues. i'd appreciate your feedback on this if you have time

@alsutton
Copy link
Copy Markdown
Contributor

There's a lot of code here to review (+2,310 −4,045). Is there any way to split it into more manageable chunks? I'm not going to have enough spare time to review a PR of this size any time soon, but I could review some smaller PRs as time allows.

@spyhunter99
Copy link
Copy Markdown
Collaborator Author

well this has been open for 2 weeks, no comments one way or another. i'm inclined to just merge it and carry

@monsieurtanuki
Copy link
Copy Markdown
Collaborator

well this has been open for 2 weeks, no comments one way or another. i'm inclined to just merge it and carry

@spyhunter99 That sounds good. If needed there can fine-tunings after the merge.

@spyhunter99 spyhunter99 merged commit 0b84050 into master May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants