add safeExtGet for compileSdkVersion

This commit is contained in:
Siddarth Kumar
2023-02-28 21:57:14 +05:30
parent 39d89fe27c
commit 6bdee9e2d0
+5 -1
View File
@@ -1,7 +1,11 @@
apply plugin: 'com.android.library'
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : 23
compileSdkVersion safeExtGet('compileSdkVersion', 30)
buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : "23.0.1"
defaultConfig {