Skip to content

Commit 207e20a

Browse files
authored
1 parent 6dfdfa2 commit 207e20a

File tree

14 files changed

+374
-523
lines changed

14 files changed

+374
-523
lines changed

example/.buckconfig

-6
This file was deleted.

example/.flowconfig

-70
This file was deleted.

example/android/build.gradle

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
buildscript {
44
ext{
55
androidGradlePluginVersion = '4.0.0'
6-
androidSdkVersion = 29
6+
androidSdkVersion = 30
77
androidMinSdkVersion = 21
88
kotlinVersion = "1.3.61"
99
kotlinStdlib = "kotlin-stdlib-jdk8"
@@ -12,9 +12,7 @@ buildscript {
1212
}
1313
repositories {
1414
google()
15-
mavenLocal()
1615
mavenCentral()
17-
jcenter()
1816
}
1917
dependencies {
2018
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion"
@@ -28,11 +26,12 @@ allprojects {
2826
mavenLocal()
2927
mavenCentral()
3028
google()
31-
jcenter()
3229
maven {
3330
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
3431
url "$rootDir/../../node_modules/react-native/android"
3532
}
33+
maven { url "$rootDir/../../node_modules/jsc-android/dist" }
34+
maven { url 'https://www.jitpack.io' }
3635
}
3736
}
3837

example/android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip

example/android/myapplication/build.gradle

+14-24
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ apply plugin: 'kotlin-android-extensions'
55
project.ext.react = [
66
root : "../../../",
77
entryFile : "index.js",
8+
cliPath : "node_modules/react-native/cli.js",
89
bundleAssetName: "index.bundle",
910
enableHermes : true,
1011
bundleInAlpha : true,
1112
bundleInBeta : true,
12-
hermesFlagsDebug:['-Xes6-proxy'],
13-
hermesFlagsRelease:['-Xes6-proxy']
13+
hermesFlagsDebug:['-Xes6-proxy','-output-source-map'],
14+
hermesFlagsRelease:['-output-source-map'],
15+
hermesCommand: "../../../node_modules/react-native/node_modules/hermes-engine/%OS-BIN%/hermesc",
1416
]
1517

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

1820
android {
21+
ndkVersion "20.1.5948944"
22+
1923
compileSdkVersion androidSdkVersion
2024

2125
defaultConfig {
@@ -39,37 +43,23 @@ android {
3943
sourceCompatibility JavaVersion.VERSION_1_8
4044
targetCompatibility JavaVersion.VERSION_1_8
4145
}
42-
def taskName = getGradle().getStartParameter().getTaskRequests().toString()
43-
44-
packagingOptions {
45-
pickFirst '**/libc++_shared.so'
46-
if (taskName.contains("InternalDebug")) {
47-
// Release libs take precedence and must be removed
48-
// to allow debugging
49-
exclude '**/libhermes-executor-release.so'
50-
} else {
51-
// Reduce size by deleting the debugger/inspector
52-
exclude '**/libhermes-inspector.so'
53-
exclude '**/libhermes-executor-debug.so'
54-
}
55-
}
56-
5746
}
5847

5948

6049
dependencies {
6150
implementation fileTree(dir: 'libs', include: ['*.jar'])
62-
def hermesPath = "../../../node_modules/hermes-engine/android/";
63-
exec {
64-
executable 'grep'
65-
args "version", '../../../node_modules/hermes-engine/package.json'
66-
}
51+
//noinspection GradleDynamicVersion
52+
implementation "com.facebook.react:react-native:+"
53+
54+
def hermesPath = "../../../node_modules/react-native/node_modules/hermes-engine/android/";
6755
debugImplementation files(hermesPath + "hermes-debug.aar")
6856
releaseImplementation files(hermesPath + "hermes-release.aar")
6957
implementation "org.jetbrains.kotlin:$kotlinStdlib:$kotlinVersion"
7058
implementation "androidx.appcompat:appcompat:1.0.0"
71-
implementation 'com.facebook.react:react-native:+'
7259
implementation project(':react-native-notifications')
7360
}
7461

75-
apply plugin: 'com.google.gms.google-services'
62+
apply plugin: 'com.google.gms.google-services'
63+
64+
apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
65+
applyNativeModulesAppBuildGradle(project, "../../../")

0 commit comments

Comments
 (0)