Skip to content

Update Android Gradle Plugin to 8.11.0 and Gradle Wrapper to 8.14.3 + update default API target to 35 in tests #3172

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

Merged
merged 8 commits into from
Jul 22, 2025

Conversation

FilipeMarch
Copy link
Contributor

Already tested here and it's working fine:
On buildozer.spec:

android.api = 36
android.minapi = 24
p4a.source_dir = /home/kivyschool/python-for-android
[INFO]:    Will compile for the following archs: arm64-v8a
[INFO]:    Found Android API target in $ANDROIDAPI: 36
[INFO]:    Found NDK dir in $ANDROIDNDK: /home/kivyschool/.buildozer/android/platform/android-ndk-r25b
[INFO]:    Found NDK version 25b
[DEBUG]:   
[DEBUG]:   	Welcome to Gradle 8.14.3!
[DEBUG]:   	
[DEBUG]:   	Here are the highlights of this release:
[DEBUG]:   	 - Java 24 support
[DEBUG]:   	 - GraalVM Native Image toolchain selection
[DEBUG]:   	 - Enhancements to test reporting
[DEBUG]:   	 - Build Authoring improvements
[DEBUG]:   
[DEBUG]:        BUILD SUCCESSFUL in 12s
[DEBUG]:        34 actionable tasks: 33 executed, 1 up-to-date
[DEBUG]:   

Summary

  • gradle-wrapper.properties: distributionUrl now points to gradle‑8.14.3‑all.zip
  • build.tmpl.gradle:
    • classpath updated from 'com.android.tools.build:gradle:8.1.1' to 'com.android.tools.build:gradle:8.11.0'
    • Repository mirror updated from jcenter() to mavenCentral().

Motivation

I tried to compile my application using android.api = 36 but started getting these logs:

[INFO]:    Detected highest available build tools version to be 36.0.0
[DEBUG]:   -> running gradlew clean assembleDebug
[DEBUG]:       WARNING: We recommend using a newer Android Gradle plugin to use compileSdk = 36
[DEBUG]:       
[DEBUG]:       This Android Gradle plugin (8.1.1) was tested up to compileSdk = 34.
[DEBUG]:       
[DEBUG]:       You are strongly encouraged to update your project to use a newer
[DEBUG]:       Android Gradle plugin that has been tested with compileSdk = 36.
[DEBUG]:       
[DEBUG]:       If you are already using the latest version of the Android Gradle plugin,
[DEBUG]:       you may need to wait until a newer version with support for compileSdk = 36 is available.
[DEBUG]:       
[DEBUG]:       To suppress this warning, add/update
[DEBUG]:           android.suppressUnsupportedCompileSdk=36
[DEBUG]:       to this project's gradle.properties.
[DEBUG]:       
[DEBUG]:       > Task :processDebugMainManifest
[DEBUG]:       /home/kivyschool/test/.buildozer/android/platform/build-arm64-v8a/dists/kivy_reloader/src/main/AndroidManifest.xml:55:18-50 Warning:
[DEBUG]:               android:extractNativeLibs should not be specified in this source AndroidManifest.xml file. See https://d.android.com/guide/topics/manifest/application-element#extractNativeLibs for more information.
[DEBUG]:       The AGP Upgrade Assistant can remove the attribute from the AndroidManifest.xml file and update the build file accordingly. See https://d.android.com/studio/build/agp-upgrade-assistant for more information.
[DEBUG]:       
[DEBUG]:       > Task :compileDebugJavaWithJavac
[DEBUG]:       Note: Some input files use or override a deprecated API.
[DEBUG]:       Note: Recompile with -Xlint:deprecation for details.
[DEBUG]:       
[DEBUG]:       Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

After some investigation:
image
image

  • Play Console enforces targetSdkVersion ≥ 35; this requires AGP ≥ 8.6 and Gradle ≥ 8.13.
  • Gradle 8.14.3 satisfies the toolchain floor for AGP 8.11.0.
  • jcenter() is deprecated; switching to mavenCentral() removes a dead dependency source.

@misl6
Copy link
Member

misl6 commented Jul 14, 2025

I tried to build with a slightly different version (been more conservative), a few days ago, and also seemed fine to me.
I see the automated tests are failing, did you already tried to reproduce it locally?

UPDATE: I see the issue might be the current default target SDK, I guess we should just increase it. 😄

@kuzeyron kuzeyron added the core-providers Core code that's not a recipe label Jul 15, 2025
@misl6
Copy link
Member

misl6 commented Jul 15, 2025

Checked test results after latest changes, APP_PLATFORM := $(NDK_API) in Application.mk might be missing for web view and library 😬

@FilipeMarch
Copy link
Contributor Author

Hum... got 32 passed, 1 failed here; it seems something went wrong on service_library

@Novfensec
Copy link
Contributor

Novfensec commented Jul 16, 2025

Latest stable NDK to build for android.api = 36 is r28c. So The default minimum should be r28c for newer builds. Also using ndk>=r28 will force 16KiB alignement as default.

To override this behavior we can do below:
This may not work as android may reject .so files

CMakeLists.txt:

set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,max-page-size=4096")

Android.mk:

LOCAL_LDFLAGS += -Wl,-z,max-page-size=4096

Overall we need to first add 16KiB support.

@T-Dynamos
Copy link
Contributor

@Novfensec SDL won't build in latest NDK until #3164 is pushed.

Ref: #3136 (comment)

@misl6
Copy link
Member

misl6 commented Jul 22, 2025

Hum... got 32 passed, 1 failed here; it seems something went wrong on service_library

APP_ABI := $(ARCH) in Application.mk of service_library is missing :)

Copy link
Member

@misl6 misl6 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@misl6 misl6 changed the title Update Android Gradle Plugin to 8.11.0 and Gradle Wrapper to 8.14.3 Update Android Gradle Plugin to 8.11.0 and Gradle Wrapper to 8.14.3 + update default API target to 35 in tests Jul 22, 2025
@misl6 misl6 merged commit a8f2ca1 into kivy:develop Jul 22, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-providers Core code that's not a recipe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy