maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
1.07k stars 318 forks source link

Make an Android release #585

Closed wipfli closed 1 year ago

wipfli commented 1 year ago

Similar to #584, we also want an Android release...

boldtrn commented 1 year ago

There is also here: https://github.com/maplibre/maplibre-gl-native/blob/82732b6e9d7770ef832be080c20414ce517b1486/platform/android/gradle/wrapper/gradle-wrapper.properties

If you are using Android Studio, they have an update utility, that makes updating the gradle version very straight forward. https://developer.android.com/studio/build/agp-upgrade-assistant

wipfli commented 1 year ago

Hm updating gradle alone does not seem to solve the issue. I run android-release.yml with @artakka's pull request #593 in https://github.com/wipfli/maplibre-gl-native/actions/runs/3683508057/jobs/6232164989 but it just gave the usual timeout... This used gradle v6

wipfli commented 1 year ago

Having listed the disadvantages of self-hosted runners, I must admit that I cannot find a solution for the timeouts on GitHub. My goal here is actually to just make a release roughly the same way we did it the last time in Dec 2021 where we also used a self-hosted runner. So now I am playing around with a self hosted runner.

While there are no read timeouts on my self-hosted runner (yay!), the android-release.yml workflow still fails in the make android-javadoc step. When running that one locally in the android docker development image, it works fine. So now I am looking for differences between my local docker android development environment, and the one we use for the GitHub action.

The action uses java 11:

https://github.com/maplibre/maplibre-gl-native/blob/142a4bc3e3d3105e50a96e763e44434f0e0695df/.github/workflows/android-release.yml#L31-L34

It is surprising to see this in the workflow because the android docker image takes care of the java environemnt I would have thought...

wipfli commented 1 year ago

I think the java version is not the problem for the failing make android-javadoc. Instead, I have noticed that the android-release.yml workflow actually checks out the repo at the latest git tag starting with android-. So this brings us actually back in time to the last release... The script doing this is called scripts/ensure-code-revision.sh

wipfli commented 1 year ago

After more back and forth I am convinced now that make android-javadoc fails because of Java 11. Here is a debug run in my fork where I had a look after which step the javadoc fails:

I think we should build the javadocs as part of android-ci-pull.yml such that we make sure that we can actually build the docs...

wipfli commented 1 year ago

I also had a look if #596 resolves the problem, but it seems it does not...

wipfli commented 1 year ago

Let's debug the javadoc stuff in https://github.com/maplibre/maplibre-gl-native/pull/603

boldtrn commented 1 year ago

I had weird Javadoc errors in maplibre-nav as well and could not find the source for these... really weird.

wipfli commented 1 year ago

If we use Java 8 or whatever the version is in the docker container in the android-release.yml workflow, i.e., if we comment out the install java 11 part, then everything works and I was able to publish to my github releases in my fork. I think there is a good chance that the maven publishing still works too.

However, it only works on java 8 before the gradle plugin update in https://github.com/maplibre/maplibre-gl-native/pull/611.

I think it would be valuable to make a release before we update too many things.

What should I do now? Revert #611, and make an android release, then add #611 again? Create a separate branch before #611 and publish from there? Or maybe fix the make android-javadoc in java 11 and make a release from where we are now?

wipfli commented 1 year ago

My preferred option would be to temporarily revert #611...

wipfli commented 1 year ago

Running the release now on a self-hosted runner. Let's see how far it gets...

https://github.com/maplibre/maplibre-gl-native/actions/runs/3726309604/jobs/6319668919

wipfli commented 1 year ago

Crashed in the firebase step. It was able to log in but then did not succeed. I think we can just disable the firebase device test for now...

wipfli commented 1 year ago

https://github.com/maplibre/maplibre-gl-native/pull/616

wipfli commented 1 year ago

Running release again this time without firebase https://github.com/maplibre/maplibre-gl-native/actions/runs/3731584555/jobs/6329980513

wipfli commented 1 year ago

I changed the commit attached to tag android-v9.6.0. If you have recently pulled maplibre-gl-native, this might lead to some errors...

wipfli commented 1 year ago

The workflow succeeded but I am not sure if it created a maven release: https://mvnrepository.com/artifact/org.maplibre.gl/android-sdk

fynngodau commented 1 year ago

I am able to download 9.6.0 from mavenCentral :+1: thank you!

wipfli commented 1 year ago

Ah really, that is great! So maybe the mvnrepository.com website just needs a bit of time...

wipfli commented 1 year ago

And does it work for you @fynngodau ?

fynngodau commented 1 year ago

Yes, it's working flawlessly as far as I can tell, will be happy to report any issues though :) great work!

wipfli commented 1 year ago

Android v9.6.0 is now also on the maven website at https://mvnrepository.com/artifact/org.maplibre.gl/android-sdk/9.6.0. Closing this one...