chore: update ui-mobile-base android script to support Java 21 and gradle 8+ (#10907)

Also allows fallbacks per detection.
This commit is contained in:
Nathan Walker
2025-10-30 10:41:52 -07:00
committed by GitHub
parent 8d3c3c3416
commit d856826b7a
4 changed files with 36 additions and 16 deletions

View File

@ -6,7 +6,7 @@ def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
apply plugin: 'com.android.library'
def computeCompileSdkVersion () {
def computeCompileSdkValue () {
if(project.hasProperty("compileSdk")) {
return compileSdk
}
@ -15,15 +15,6 @@ def computeCompileSdkVersion () {
}
}
def computeBuildToolsVersion() {
if(project.hasProperty("buildToolsVersion")) {
return buildToolsVersion
}
else {
return "32.0.0"
}
}
def computeTargetSdkVersion() {
if(project.hasProperty("targetSdk")) {
return targetSdk
@ -34,12 +25,13 @@ def computeTargetSdkVersion() {
}
android {
compileSdkVersion computeCompileSdkVersion()
buildToolsVersion computeBuildToolsVersion()
// AGP 8 DSL: use 'compileSdk' and specify namespace
compileSdk computeCompileSdkValue()
namespace "org.nativescript.widgets"
defaultConfig {
minSdkVersion 17
targetSdkVersion computeTargetSdkVersion()
minSdk 17
targetSdk computeTargetSdkVersion()
versionCode 1
versionName "1.0"
}