Skip to content

Commit 2908f85

Browse files
committed
Upgrade packages, add react-native-config package
1 parent aa7ac1d commit 2908f85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1155
-458
lines changed

.babelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": ["module:metro-react-native-babel-preset"],
3+
"plugins": [
4+
["@babel/plugin-proposal-decorators", {
5+
"legacy": true
6+
}]
7+
]
8+
}

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
API_URL=http://localhost:8000/api/

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
./**/__tests__/**/*.js
44
__mocks__/**/*.js
55
jest-setup.js
6-
babel.config.js

android/app/build.gradle

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
23

34
import com.android.build.OutputFile
45

@@ -101,7 +102,7 @@ android {
101102
applicationId "com.reactnativestarterkit"
102103
minSdkVersion rootProject.ext.minSdkVersion
103104
targetSdkVersion rootProject.ext.targetSdkVersion
104-
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative57"
105+
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative57_5"
105106
versionCode 1
106107
versionName "1.0"
107108
ndk {
@@ -151,8 +152,9 @@ configurations.all {
151152
}
152153

153154
dependencies {
154-
compile project(':react-native-fbsdk')
155-
compile project(':react-native-vector-icons')
155+
implementation project(':react-native-config')
156+
implementation project(':react-native-fbsdk')
157+
implementation project(':react-native-vector-icons')
156158
implementation fileTree(dir: "libs", include: ["*.jar"])
157159
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
158160
implementation "com.facebook.react:react-native:+" // From node_modules
@@ -166,17 +168,17 @@ task copyDownloadableDepsToLibs(type: Copy) {
166168
into 'libs'
167169
}
168170

169-
subprojects { subproject ->
170-
afterEvaluate {
171-
if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
172-
android {
173-
variantFilter { variant ->
174-
def names = variant.flavors*.name
175-
if (names.contains("reactNative51") || names.contains("reactNative55")) {
176-
setIgnore(true)
177-
}
178-
}
179-
}
180-
}
181-
}
182-
}
171+
//subprojects { subproject ->
172+
// afterEvaluate {
173+
// if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
174+
// android {
175+
// variantFilter { variant ->
176+
// def names = variant.flavors*.name
177+
// if (names.contains("reactNative51") || names.contains("reactNative55")) {
178+
// setIgnore(true)
179+
// }
180+
// }
181+
// }
182+
// }
183+
// }
184+
//}

android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
<uses-permission android:name="android.permission.INTERNET" />
77
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
88

9-
<uses-sdk
10-
android:minSdkVersion="16"
11-
android:targetSdkVersion="22" />
12-
139
<application
1410
android:name=".MainApplication"
1511
android:allowBackup="true"

android/app/src/main/java/com/reactnativestarterkit/MainApplication.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6+
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
67
import com.facebook.reactnative.androidsdk.FBSDKPackage;
78
import com.facebook.react.ReactNativeHost;
89
import com.facebook.react.ReactPackage;
@@ -49,8 +50,9 @@ protected List<ReactPackage> getPackages() {
4950
// Add additional packages you require here
5051
// No need to add RnnPackage and MainReactPackage
5152
return Arrays.<ReactPackage>asList(
52-
new VectorIconsPackage(),
53-
new FBSDKPackage(mCallbackManager)
53+
new VectorIconsPackage(),
54+
new FBSDKPackage(mCallbackManager),
55+
new ReactNativeConfigPackage()
5456
);
5557
}
5658

android/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "27.0.3"
5+
buildToolsVersion = "28.0.3"
66
minSdkVersion = 19
7-
compileSdkVersion = 27
8-
targetSdkVersion = 26
9-
supportLibVersion = "27.1.1"
7+
compileSdkVersion = 28
8+
targetSdkVersion = 27
9+
supportLibVersion = "28.0.0"
1010
}
1111
repositories {
1212
google()
@@ -15,7 +15,7 @@ buildscript {
1515
jcenter()
1616
}
1717
dependencies {
18-
classpath 'com.android.tools.build:gradle:3.1.4'
18+
classpath 'com.android.tools.build:gradle:3.2.1'
1919

2020
// NOTE: Do not place your application dependencies here; they belong
2121
// in the individual module build.gradle files
@@ -38,6 +38,6 @@ allprojects {
3838

3939

4040
task wrapper(type: Wrapper) {
41-
gradleVersion = '4.4'
41+
gradleVersion = '4.6'
4242
distributionUrl = distributionUrl.replace("bin", "all")
4343
}

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
rootProject.name = 'ReactNativeStarterKit'
2+
include ':react-native-config'
3+
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
24
include ':react-native-fbsdk'
35
project(':react-native-fbsdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fbsdk/android')
46
include ':react-native-vector-icons'

babel.config.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)