mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
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:
@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user