Skip to content

Commit f67ce6a

Browse files
Update and fix Gradle setup
1 parent bec8ff3 commit f67ce6a

12 files changed

+4466
-2331
lines changed

.babelrc

-3
This file was deleted.

.gitignore

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
21
# OSX
32
#
43
.DS_Store
54

6-
# node.js
7-
#
8-
node_modules/
9-
npm-debug.log
10-
yarn-error.log
11-
12-
135
# Xcode
146
#
157
build/
@@ -29,7 +21,6 @@ DerivedData
2921
*.ipa
3022
*.xcuserstate
3123
project.xcworkspace
32-
3324

3425
# Android/IntelliJ
3526
#
@@ -38,9 +29,17 @@ build/
3829
.gradle
3930
local.properties
4031
*.iml
32+
android/gradle/
33+
android/gradlew
34+
android/gradlew.bat
35+
36+
# node.js
37+
#
38+
node_modules/
39+
npm-debug.log
40+
yarn-error.log
4141

4242
# BUCK
4343
buck-out/
4444
\.buckd/
4545
*.keystore
46-

android/build.gradle

+23-15
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ def safeExtGet(prop, fallback) {
33
}
44

55
buildscript {
6-
repositories {
7-
maven {
8-
url 'https://maven.google.com/'
9-
name 'Google'
6+
// The Android Gradle plugin is only required when opening the android folder stand-alone.
7+
// This avoids unnecessary downloads and potential conflicts when the library is included as a
8+
// module dependency in an application project.
9+
if (project == rootProject) {
10+
repositories {
11+
google()
12+
jcenter()
13+
}
14+
dependencies {
15+
classpath 'com.android.tools.build:gradle:3.5.3'
1016
}
11-
jcenter()
12-
}
13-
14-
dependencies {
15-
classpath 'com.android.tools.build:gradle:3.2.1'
1617
}
1718
}
1819

1920
apply plugin: 'com.android.library'
2021

2122
android {
22-
compileSdkVersion safeExtGet('compileSdkVersion', 27)
23-
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.2')
24-
23+
compileSdkVersion safeExtGet('compileSdkVersion', 28)
24+
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
2525
defaultConfig {
2626
minSdkVersion safeExtGet('minSdkVersion', 16)
2727
targetSdkVersion safeExtGet('targetSdkVersion', 26)
@@ -37,14 +37,22 @@ android {
3737
}
3838

3939
repositories {
40+
mavenLocal()
41+
maven {
42+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
43+
url "$rootDir/../node_modules/react-native/android"
44+
}
4045
maven {
41-
url 'https://maven.google.com/'
42-
name 'Google'
46+
// Android JSC is installed from npm
47+
url "$rootDir/../node_modules/jsc-android/dist"
4348
}
49+
google()
4450
jcenter()
4551
}
4652

4753
dependencies {
48-
implementation 'com.facebook.react:react-native:'+safeExtGet('reactNativeVersion', '+')
54+
//noinspection GradleDynamicVersion
55+
implementation 'com.facebook.react:react-native:+' // From node_modules
4956
implementation 'net.openid:appauth:0.7.1'
57+
implementation 'androidx.browser:browser:1.2.0'
5058
}

android/gradle.properties

-2
This file was deleted.
-52.4 KB
Binary file not shown.

android/gradle/wrapper/gradle-wrapper.properties

-6
This file was deleted.

android/gradlew

-160
This file was deleted.

android/gradlew.bat

-90
This file was deleted.

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ['module:metro-react-native-babel-preset'],
3+
};

0 commit comments

Comments
 (0)