Skip to content

Commit 494a5ba

Browse files
authored
Update android sdk tools: agp to 8.11.0, gradle to 8.14.3 (#2585)
1 parent 75317b1 commit 494a5ba

File tree

33 files changed

+63
-52
lines changed

33 files changed

+63
-52
lines changed

1k/build.profiles

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ axslcc=1.9.6+
1010

1111
# The cmake, @gradle @axmol-cmdline
1212
# as latest as possible
13-
cmake=3.30.0~4.0.2+
13+
cmake=3.30.0~4.0.3+
1414

1515
# The ninja
1616
ninja=1.10.0~1.12.1+
@@ -58,19 +58,19 @@ min_sdk=17
5858

5959
# The gradle version, @setup.ps1
6060
# as latest as possible
61-
gradle=8.13
61+
gradle=8.14.3
6262

6363
# The android gradle plugin, @setup.ps1
6464
# as stable as possible, match with build-tools,android-studio
65-
agp=8.10.0
65+
agp=8.11.0
6666

6767
# The android build-tools, @axmol-cmdline @gradle
6868
# as stable as possible, match with agp,android-studio
6969
buildtools=35.0.0
7070

7171
# The android studio, @hint
7272
# as latest as possible, but match with agp, build-tools
73-
androidstudio=2024.3.2+
73+
androidstudio=2025.1.1+
7474

7575
# The android dependencies managed by @gradle
7676
appcompat=1.7.0

docs/DevSetup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,19 @@ Please see the [Windows workflow guide](https://github.com/axmolengine/axmol/iss
162162

163163
### Android (with Android Studio)
164164

165-
1. Install [Android Studio 2024.3.2+](https://developer.android.com/studio).
165+
1. Install [Android Studio 2025.1.1+](https://developer.android.com/studio).
166166
2. When starting Android Studio for the first time, it will guide you through the installation of the SDK and other tools. Please make sure that you do install them.
167167
3. Ensure that the ANDROID_HOME environment variable is set up correctly to point to the Android SDK folder.
168168
4. Open a *new* Powershell instance, and enter the `axmol` root directory in Powershell.
169169
5. Run `./setup.ps1 -p android` to download the a supported version of the NDK, which in this case is r23d. You can set a project to use a different version of the NDK.
170170
6. Start Android Studio and choose [Open an existing Android Studio Project] and select your project. For example, the existing `cpp-test` project located in `axmol\tests\cpp-tests\proj.android`.
171171
7. Start Android Studio and open 'Tools' -> 'SDKManager', then switch to 'SDK Tools', check the 'Show Package Details' field, and choose the following tools clicking the button 'Apply' to install them:
172172
- Android SDK Platform 36
173-
- Android Gradle Plugin (AGP) 8.10.0
173+
- Android Gradle Plugin (AGP) 8.11.0
174174
- Android SDK Build-Tools 35.0.0 match with AGP, refer to: <https://developer.android.com/studio/releases/gradle-plugin>
175-
- Gradle 8.13
175+
- Gradle 8.14.3
176176
- NDK r23c, if you need support Android 15 16KB page size, you must use r23d or r27+
177-
- __IMPORTANT__: axmol itself not use all c++20 features, so just require ndk-r23c+, if you need more c++20 feature in your game project, consider use NDK r26+
177+
- __IMPORTANT__: axmol itself not use all c++20 features, so just require ndk-r23c+, if you need more c++20 feature in your game project, consider use NDK r26+ (LTS version r27c is recommended)
178178
8. Wait for the `Gradle sync` to finish.
179179

180180
Note: if you use non-SDK provided CMake, you will need to download `ninja` from <https://github.com/ninja-build/ninja/releases>, and copy `ninja.exe` to CMake's bin directory.

setup.ps1

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ if (!(Test-Path $prefix -PathType Container)) {
377377
. $1k_script -setupOnly -prefix $prefix @args
378378
379379
if ($updateAdt) {
380+
[System.Threading.Thread]::CurrentThread.CurrentCulture = 'en-US'
381+
$current_time = Get-Date -UFormat "%a %b %e %T UTC%Z %Y"
382+
380383
# ---------- Update gradle ----------
381384
$gradleVer = $build_profiles['gradle']
382385
$aproj_source_root = Join-Path $AX_ROOT 'templates/common/proj.android'
@@ -391,8 +394,16 @@ if ($updateAdt) {
391394
}
392395
393396
$gradle_settings_file = Join-Path $aproj_source_gradle_wrapper 'gradle-wrapper.properties'
394-
$settings_content = [System.IO.File]::ReadAllText($gradle_settings_file)
395-
$settings_content = [Regex]::Replace($settings_content, 'gradle-.+-bin.zip', "gradle-$gradleVer-bin.zip")
397+
$settings_lines = Get-Content $gradle_settings_file
398+
$settings_lines[0] = "#$current_time"
399+
for($i = 1; $i -lt $settings_lines.Count; ++$i) {
400+
$line_text = $settings_lines[$i]
401+
if ($line_text -match '^distributionUrl\s*=.*') {
402+
$settings_lines[$i] = [Regex]::Replace($line_text, 'gradle-.+-bin.zip', "gradle-$gradleVer-bin.zip")
403+
break
404+
}
405+
}
406+
$settings_content = $settings_lines -join "`n"
396407
[System.IO.File]::WriteAllText($gradle_settings_file, $settings_content)
397408
398409
# download gradle-wrapper.jar gradlew and gradlew.bat from upstream

templates/common/proj.android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
}
88

99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.10.0'
10+
classpath 'com.android.tools.build:gradle:8.11.0'
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
59 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat Apr 6 23:59:59 CST 2024
1+
#Sun Jul 6 00:44:51 UTC+08 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

templates/common/proj.android/gradlew

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/common/proj.android/gradlew.bat

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/cpp-tests/proj.android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
}
88

99
dependencies {
10-
classpath 'com.android.tools.build:gradle:8.10.0'
10+
classpath 'com.android.tools.build:gradle:8.11.0'
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
59 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)