Skip to content

Commit

Permalink
Merge pull request #117 from SaeedZhiany/patch-1
Browse files Browse the repository at this point in the history
fixed Gradle setup
  • Loading branch information
jayfunk authored May 9, 2022
2 parents c86ede4 + aa7a768 commit 28bfb40
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@ apply plugin: 'com.android.library'

description = 'react-native-biometrics'

def DEFAULT_COMPILE_SDK_VERSION = 29
def DEFAULT_BUILD_TOOLS_VERSION = "29.0.2"
def DEFAULT_MIN_SDK_VERSION = 16
def DEFAULT_TARGET_SDK_VERSION = 29

buildscript {
repositories {
google()
jcenter()
// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
// module dependency in an application project.
if (project == rootProject) {
repositories {
google()
jcenter()
}

dependencies {
classpath("com.android.tools.build:gradle:3.6.2")
}
}
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
}
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
compileSdkVersion safeExtGet('compileSdkVersion', 29)

defaultConfig {
minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 29)
}
lintOptions {
abortOnError false
Expand Down

0 comments on commit 28bfb40

Please sign in to comment.