[tests] build RN Android from source

This commit is contained in:
Salakar 2018-08-25 19:24:52 +01:00
parent a040485193
commit c328b59f78
3 changed files with 16 additions and 1 deletions

View File

@ -13,6 +13,11 @@ apply from: "../../node_modules/react-native/react.gradle"
def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
// comment out when not building RN from source
configurations.all {
exclude group: 'com.facebook.react', module: 'react-native'
}
android {
compileSdkVersion 27
// buildToolsVersion '27.0.2'
@ -79,9 +84,13 @@ android {
}
dependencies {
implementation "com.facebook.react:react-native:+"
implementation fileTree(dir: "libs", include: ["*.jar"])
// uncomment when not building RN from source:
// implementation "com.facebook.react:react-native:+"
// compile from source
// comment out when not building RN from source:
implementation project(':ReactAndroid')
/* ----------------------------

View File

@ -11,6 +11,7 @@ buildscript {
classpath 'com.google.gms:google-services:4.0.1'
classpath 'com.google.firebase:firebase-plugins:1.1.5'
classpath 'io.fabric.tools:gradle:1.25.4'
classpath 'de.undercouch:gradle-download-task:3.1.2'
}
}

View File

@ -1,4 +1,9 @@
rootProject.name = 'RNFTests'
include ':ReactAndroid'
project(':ReactAndroid').projectDir = new File(
rootProject.projectDir, '../node_modules/react-native/ReactAndroid')
include ':jet'
project(':jet').projectDir = new File(rootProject.projectDir, '../node_modules/jet/android')