Skip to content

upgrade to [email protected] #805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions example/.buckconfig

This file was deleted.

70 changes: 0 additions & 70 deletions example/.flowconfig

This file was deleted.

7 changes: 3 additions & 4 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildscript {
ext{
androidGradlePluginVersion = '4.0.0'
androidSdkVersion = 29
androidSdkVersion = 30
androidMinSdkVersion = 21
kotlinVersion = "1.3.61"
kotlinStdlib = "kotlin-stdlib-jdk8"
Expand All @@ -12,9 +12,7 @@ buildscript {
}
repositories {
google()
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion"
Expand All @@ -28,11 +26,12 @@ allprojects {
mavenLocal()
mavenCentral()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../../node_modules/react-native/android"
}
maven { url "$rootDir/../../node_modules/jsc-android/dist" }
maven { url 'https://www.jitpack.io' }
}
}

Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
38 changes: 14 additions & 24 deletions example/android/myapplication/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ apply plugin: 'kotlin-android-extensions'
project.ext.react = [
root : "../../../",
entryFile : "index.js",
cliPath : "node_modules/react-native/cli.js",
bundleAssetName: "index.bundle",
enableHermes : true,
bundleInAlpha : true,
bundleInBeta : true,
hermesFlagsDebug:['-Xes6-proxy'],
hermesFlagsRelease:['-Xes6-proxy']
hermesFlagsDebug:['-Xes6-proxy','-output-source-map'],
hermesFlagsRelease:['-output-source-map'],
hermesCommand: "../../../node_modules/react-native/node_modules/hermes-engine/%OS-BIN%/hermesc",
]

apply from: "../../../node_modules/react-native/react.gradle"

android {
ndkVersion "20.1.5948944"

compileSdkVersion androidSdkVersion

defaultConfig {
Expand All @@ -39,37 +43,23 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
def taskName = getGradle().getStartParameter().getTaskRequests().toString()

packagingOptions {
pickFirst '**/libc++_shared.so'
if (taskName.contains("InternalDebug")) {
// Release libs take precedence and must be removed
// to allow debugging
exclude '**/libhermes-executor-release.so'
} else {
// Reduce size by deleting the debugger/inspector
exclude '**/libhermes-inspector.so'
exclude '**/libhermes-executor-debug.so'
}
}

}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
def hermesPath = "../../../node_modules/hermes-engine/android/";
exec {
executable 'grep'
args "version", '../../../node_modules/hermes-engine/package.json'
}
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"

def hermesPath = "../../../node_modules/react-native/node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
implementation "org.jetbrains.kotlin:$kotlinStdlib:$kotlinVersion"
implementation "androidx.appcompat:appcompat:1.0.0"
implementation 'com.facebook.react:react-native:+'
implementation project(':react-native-notifications')
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.gms.google-services'

apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
applyNativeModulesAppBuildGradle(project, "../../../")
Loading