Skip to content

Commit

Permalink
fix: update android native dependencies
Browse files Browse the repository at this point in the history
* feat: remove jCenter
* feat: bump android gradle plugin and gradle-wrapper
* feat: use safeExtGet to get min, target and compileSdk, 
* feat: bump compileSdk to 31
* chore(android): use single quotes
  • Loading branch information
eliaslecomte authored May 26, 2023
1 parent 1a4bc80 commit 472896d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
17 changes: 10 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@

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

buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:7.1.3'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
compileSdkVersion safeExtGet(compileSdkVersion, 31)

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
minSdkVersion 21
targetSdkVersion 29
minSdkVersion safeExtGet(minSdkVersion, 21)
targetSdkVersion safeExtGet(targetSdkVersion, 31)
versionCode 1
versionName "1.0"
versionName '1.0'
}
}

Expand All @@ -34,7 +37,7 @@ repositories {
url "$projectDir/../node_modules/react-native/android"
}
google()
jcenter()
mavenCentral()
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Jun 11 07:37:41 CEST 2020
#Mon Sep 05 19:12:21 CEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 472896d

Please sign in to comment.