Skip to content

Commit

Permalink
feat: Add react-native 0.65 support (#378)
Browse files Browse the repository at this point in the history
* fix `;`

* upgrade react-native to 0.65.1

* upgrade example to react-native 0.65.1

* Update Podfile.lock

* Update Podfile.lock

* add `jcenter()` temporarily

* upgrade gradle tools (kotlin, build-tools, swipe-to-refresh)

* Upgrade `react-native-navigation` to `7.18.1-snapshot.1611`

* chore(deps): Upgrade a few more deps
  • Loading branch information
mrousavy committed Aug 20, 2021
1 parent 8e02b49 commit cae08a1
Show file tree
Hide file tree
Showing 11 changed files with 813 additions and 982 deletions.
9 changes: 4 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import java.nio.file.Paths

def reactNative = new File("$projectDir/../node_modules/react-native")

def FOR_HERMES = System.getenv("FOR_HERMES") == "True";
def FOR_HERMES = System.getenv("FOR_HERMES") == "True"
rootProject.getSubprojects().forEach({project ->
if (project.plugins.hasPlugin("com.android.application")) {
FOR_HERMES = project.ext.react.enableHermes;
FOR_HERMES = project.ext.react.enableHermes
}
})

Expand Down Expand Up @@ -52,14 +52,14 @@ buildscript {

repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}

dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'de.undercouch:gradle-download-task:4.1.2'
// noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand Down Expand Up @@ -136,7 +136,6 @@ android {

repositories {
mavenCentral()
jcenter()
google()

def found = false
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ VisionCamera_buildToolsVersion=30.0.0
VisionCamera_compileSdkVersion=30
VisionCamera_kotlinVersion=1.5.0
VisionCamera_targetSdkVersion=30
VisionCamera_ndkVersion=22.0.7026061
VisionCamera_ndkVersion=20.1.5948944
android.enableJetifier=true
android.useAndroidX=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
13 changes: 4 additions & 9 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@ android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

dexOptions {
javaMaxHeapSize "4g"
}
Expand Down Expand Up @@ -194,24 +189,24 @@ dependencies {
implementation "com.facebook.react:react-native:+" // From node_modules


implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
def hermesPath = "../../node_modules/hermes-engine/android/"
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}

implementation project(':react-native-vision-camera')
implementation "androidx.camera:camera-core:1.1.0-alpha05"
implementation "androidx.camera:camera-core:1.1.0-alpha08"
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
from configurations.implementation
into 'libs'
}

Expand Down
12 changes: 7 additions & 5 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
buildscript {
ext {
RNNKotlinVersion = "1.3.61"
buildToolsVersion = "30.0.0"
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
}
repositories {
google()
jcenter()
mavenCentral()
jcenter() // <-- TODO: REMOVE jcenter() WHEN BlurView & Video supports it
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0"
classpath("com.android.tools.build:gradle:4.1.3")
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
classpath("com.android.tools.build:gradle:4.2.2")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -24,6 +25,8 @@ buildscript {

allprojects {
repositories {
mavenCentral()
jcenter() // <-- TODO: REMOVE jcenter() WHEN BlurView & Video supports it
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
Expand All @@ -35,7 +38,6 @@ allprojects {
}

google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit cae08a1

Please sign in to comment.