Skip to content
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

Android: Increase target/compiled SDK version to 32 #12911

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

srifqi
Copy link
Contributor

@srifqi srifqi commented Oct 31, 2022

Goal of the PR
This PR increases target/compiled SDK version to 32 and also updates Build Tools, NDK, and Gradle for Android build.

How does the PR work?

  • Target/compiled SDK version: 30 -> 32
  • Android Build Tools: 30.0.3 -> 32.0.0
  • Android NDK: 23.2.8568313 -> 25.1.8937393 (r25b)
  • Gradle: 7.2 -> 7.3.3
  • Android Gradle plugin (for Build Tools): 7.0.3 -> 7.2.2
  • Change jcenter() to mavenCentral()
  • androidx.appcompat:appcompat: 1.3.1 -> 1.5.1

I tested before and found that the minetest/minetest_android_deps still works with this higher version. It is optional to be the same version as this PR (NDK r25b).

Does it resolve any reported issue?
Yes, this PR tries to fix failed build on GitHub Action. The error message is as below:

* What went wrong:
Execution failed for task ':native:extractReleaseAnnotations'.
> Could not resolve all dependencies for configuration ':native:lintClassPath'.
   > Could not determine artifacts for org.codehaus.groovy:groovy-all:3.0.7: Skipped due to earlier error

I am not sure whether this is the correct way to fix it, but this is good as a periodic dependencies update.

Another thing to note is that Google Play will require updates to be targeting 31+ since 1 November 2022.

Does this relate to a goal in the roadmap?
Probably, this PR tries to fix a continuous integration (CI) problem and to fulfil Google Play's requirement.

To do

This PR is Ready for Review.

How to test

  1. Compile Minetest for Android.
  2. There should be no compilation error and no regression.

Build Tools, NDK, and Gradle are also updated.
Repositories is changed from jcenter() to mavenCentral().
@nerzhul
Copy link
Contributor

nerzhul commented Oct 31, 2022

ok for me

@nerzhul nerzhul added @ Build CMake, build scripts, official builds, compiler and linker errors Android labels Oct 31, 2022
Copy link
Collaborator

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not too sure about mismatching NDK versions but if you say it works..

@sfan5 sfan5 merged commit fb3085a into luanti-org:master Oct 31, 2022
@srifqi
Copy link
Contributor Author

srifqi commented Nov 1, 2022

Thank you for the merge! While it is optional, we can update the NDK version to be r25b for the minetest/minetest_android_deps repository just to be safe.

@srifqi srifqi deleted the update_android_2 branch November 1, 2022 05:00
tamara-schmitz pushed a commit to tamara-schmitz/minetest that referenced this pull request Nov 9, 2022

Unverified

No user is associated with the committer email.
Build Tools, NDK, and Gradle are also updated.
Repositories is changed from jcenter() to mavenCentral().
@sfan5
Copy link
Collaborator

sfan5 commented Jan 2, 2023

From the NDK changelog:
grafik

That means since this PR we have lost support for Android 4.1 - 4.3, I checked Google Play and this is <1% of our install base.
So I don't think it's a problem but it should be made explicit by raising minSdkVersion.

@srifqi
Copy link
Contributor Author

srifqi commented Jan 3, 2023

Oh, I did not notice that! I have not tested it in devices older than Android 6.0.1 (API level 23, 2015) because I only have Android 6.0.1 and Android 13.


Comparisons between related "block" (voxel) games on the Google Play Store:

Name Min. API Level
Minetest 16 (4.1, current), 19 (4.4, should be)
Minecraft 21 (Android 5.0)
Minecraft: Education Edition 26 (Android 8.0)
MultiCraft 21 (Android 5.0)
WorldCraft 21 (Android 5.0)

Android API levels cheat sheet: https://apilevels.com/

@sfan5
Copy link
Collaborator

sfan5 commented Jan 3, 2023

Sure. Can you open a PR to increase our minimum api level properly?

@rubenwardy
Copy link
Contributor

I suggest increasing min API to 21 at least, it reduces our testing requirements

appgurueu pushed a commit to appgurueu/minetest that referenced this pull request May 2, 2023
Build Tools, NDK, and Gradle are also updated.
Repositories is changed from jcenter() to mavenCentral().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android @ Build CMake, build scripts, official builds, compiler and linker errors >= Two approvals ✅ ✅
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants