Skip to content

Commit

Permalink
Merge pull request #161 from adityamohta/master
Browse files Browse the repository at this point in the history
fix: build failures on project with greater sdk versions
  • Loading branch information
johnsonsu authored Jun 3, 2024
2 parents 11d25f5 + abaf015 commit 231540e
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@

apply plugin: 'com.android.library'

def DEFAULT_COMPILE_SDK_VERSION = 31
def DEFAULT_BUILD_TOOLS_VERSION = '31.0.3'
def DEFAULT_MIN_SDK_VERSION = 16
def DEFAULT_TARGET_SDK_VERSION = 31

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
compileSdkVersion 31
buildToolsVersion "28.0.3"
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)

defaultConfig {
minSdkVersion 16
targetSdkVersion 31
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
versionCode 1
versionName "1.0"
ndk {
Expand Down

0 comments on commit 231540e

Please sign in to comment.