Skip to content

Commit 835236b

Browse files
committed
fix(android): update gradle config
1 parent bba0b9a commit 835236b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

android/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@ buildscript {
66
jcenter()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.2.1'
9+
classpath 'com.android.tools.build:gradle:4.2.2'
1010
}
1111
}
1212
}
1313

1414
apply plugin: 'com.android.library'
1515

16-
def DEFAULT_COMPILE_SDK_VERSION = 30
17-
def DEFAULT_BUILD_TOOLS_VERSION = "30.0.2"
18-
def DEFAULT_TARGET_SDK_VERSION = 30
16+
def getExtOrDefault(name) {
17+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['SQLite2_' + name]
18+
}
1919

2020
android {
21-
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
22-
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
21+
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
22+
buildToolsVersion getExtOrDefault('buildToolsVersion')
23+
ndkVersion getExtOrDefault('ndkVersion')
2324

2425
defaultConfig {
2526
minSdkVersion 16

android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
SQLite2_compileSdkVersion=30
2+
SQLite2_buildToolsVersion=30.0.2
3+
SQLite2_targetSdkVersion=30
14
android.useAndroidX=true
25
android.enableJetifier=true

0 commit comments

Comments
 (0)