Skip to content

Commit f27e4fe

Browse files
committed
build React Native from fork
1 parent 03472b6 commit f27e4fe

12 files changed

Lines changed: 884 additions & 474 deletions

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ timeout(90) {
5454

5555
// Android
5656
stage('Build (Android)') {
57-
sh 'cd android && ./gradlew assembleRelease'
57+
sh 'cd android && ./gradlew react-native-android:installArchives && ./gradlew assembleRelease'
5858
}
5959

6060
stage('Deploy (Android)') {

Jenkinsfile.nightly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ timeout(90) {
5050
}
5151

5252
stage('Build (Android)') {
53-
sh 'cd android && ./gradlew assembleRelease'
53+
sh 'cd android && ./gradlew react-native-android:installArchives && ./gradlew assembleRelease'
5454
}
5555

5656
stage('Build (iOS)') {

Jenkinsfile.nightly_fastlane

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ timeout(90) {
7070
}
7171

7272
stage('Build (Android)') {
73-
sh 'cd android && ./gradlew assembleRelease'
73+
sh 'cd android && ./gradlew react-native-android:installArchives && ./gradlew assembleRelease'
7474
}
7575

7676
stage('Build (iOS)') {

Jenkinsfile.parameters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ timeout(90) {
7171

7272
// Android
7373
stage('Build (Android)') {
74-
sh 'cd android && ./gradlew assembleRelease'
74+
sh 'cd android && ./gradlew react-native-android:installArchives && ./gradlew assembleRelease'
7575
}
7676
stage('Deploy (Android)') {
7777
withCredentials([string(credentialsId: 'diawi-token', variable: 'token')]) {

Jenkinsfile.release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ timeout(90) {
7070
}
7171

7272
stage('Build (Android)') {
73-
sh 'cd android && ./gradlew assembleRelease -PreleaseVersion=' + version
73+
sh 'cd android && ./gradlew react-native-android:installArchives && ./gradlew assembleRelease -PreleaseVersion=' + version
7474
}
7575

7676
stage('Build (iOS)') {

Jenkinsfile.upload_release_android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ timeout(90) {
7474
}
7575

7676
stage('Build (Android)') {
77-
sh 'cd android && ./gradlew assembleRelease -PreleaseVersion=' + version
77+
sh 'cd android && ./gradlew react-native-android:installArchives && ./gradlew assembleRelease -PreleaseVersion=' + version
7878
}
7979

8080
stage('Deploy (Android)') {

android/app/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ android {
196196
sourceSets { main { jniLibs.srcDirs 'libs' } }
197197
}
198198

199+
configurations.all {
200+
exclude group: 'com.facebook.react', module: 'react-native'
201+
}
202+
199203
dependencies {
200204
implementation project(':react-native-background-timer')
201205
implementation project(':react-native-svg')
@@ -211,7 +215,8 @@ dependencies {
211215
implementation "com.android.support:appcompat-v7:26.1.0"
212216
// Force using exact RN version instead of relying on gradle dependency resolution
213217
// https://docs.gradle.org/current/userguide/introduction_dependency_management.html#sec:dependency_resolution
214-
compile ("com.facebook.react:react-native:0.55.4") { force = true } // From node_modules
218+
//compile ("com.facebook.react:react-native:0.55.4") { force = true } // From node_modules
219+
implementation project(':react-native-android')
215220
implementation project(':react-native-i18n')
216221
implementation project(':react-native-camera')
217222
implementation project(':react-native-status')

android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ buildscript {
88
dependencies {
99
classpath 'com.android.tools.build:gradle:3.0.1'
1010
classpath 'com.google.gms:google-services:3.0.0'
11+
classpath 'de.undercouch:gradle-download-task:3.1.2'
1112

1213
// NOTE: Do not place your application dependencies here; they belong
1314
// in the individual module build.gradle files
@@ -26,4 +27,4 @@ allprojects {
2627
maven { url "http://139.162.11.12:8081/artifactory/libs-release-local" }
2728
maven { url "https://jitpack.io" }
2829
}
29-
}
30+
}

android/settings.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@ project(':react-native-webview-bridge').projectDir = new File(rootProject.projec
4141
include ':react-native-config'
4242
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
4343
include ':react-native-testfairy'
44-
project(':react-native-testfairy').projectDir = new File(settingsDir, '../node_modules/react-native-testfairy/android')
44+
project(':react-native-testfairy').projectDir = new File(settingsDir, '../node_modules/react-native-testfairy/android')
45+
46+
include ':react-native-android'
47+
project(':react-native-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native/ReactAndroid')

0 commit comments

Comments
 (0)