Android tests working
This commit is contained in:
parent
91938db0c1
commit
03484e824a
|
@ -24,13 +24,13 @@ module.exports = {
|
||||||
},
|
},
|
||||||
'android.debug': {
|
'android.debug': {
|
||||||
type: 'android.apk',
|
type: 'android.apk',
|
||||||
binaryPath: 'android/app/build/outputs/apk/debug/app-experimental-play-debug.apk',
|
binaryPath: 'android/app/build/outputs/apk/experimentalPlay/debug/app-experimental-play-debug.apk',
|
||||||
build: 'cd android ; ./gradlew assembleExperimentalPlayDebug assembleAndroidTest -DtestBuildType=debug ; cd -',
|
build: 'cd android ; ./gradlew assembleExperimentalPlayDebug assembleAndroidTest -DtestBuildType=debug ; cd -',
|
||||||
reversePorts: [8081]
|
reversePorts: [8081]
|
||||||
},
|
},
|
||||||
'android.release': {
|
'android.release': {
|
||||||
type: 'android.apk',
|
type: 'android.apk',
|
||||||
binaryPath: 'android/app/build/outputs/apk/release/app-experimental-play-release.apk',
|
binaryPath: 'android/app/build/outputs/apk/experimentalPlay/release/app-experimental-play-release.apk',
|
||||||
build: 'cd android ; ./gradlew assembleExperimentalPlayRelease assembleAndroidTest -DtestBuildType=release ; cd -'
|
build: 'cd android ; ./gradlew assembleExperimentalPlayRelease assembleAndroidTest -DtestBuildType=release ; cd -'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -50,7 +50,7 @@ module.exports = {
|
||||||
emulator: {
|
emulator: {
|
||||||
type: 'android.emulator',
|
type: 'android.emulator',
|
||||||
device: {
|
device: {
|
||||||
avdName: 'Pixel_3a_API_30_x86'
|
avdName: 'Pixel_4_XL_API_31'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -250,6 +250,7 @@ android {
|
||||||
release {
|
release {
|
||||||
minifyEnabled enableProguardInReleaseBuilds
|
minifyEnabled enableProguardInReleaseBuilds
|
||||||
setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'])
|
setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'])
|
||||||
|
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
if (!isFoss) {
|
if (!isFoss) {
|
||||||
firebaseCrashlytics {
|
firebaseCrashlytics {
|
||||||
|
@ -280,10 +281,6 @@ android {
|
||||||
dimension = "app"
|
dimension = "app"
|
||||||
buildConfigField "boolean", "IS_OFFICIAL", "false"
|
buildConfigField "boolean", "IS_OFFICIAL", "false"
|
||||||
}
|
}
|
||||||
e2e {
|
|
||||||
dimension = "app"
|
|
||||||
buildConfigField "boolean", "IS_OFFICIAL", "false"
|
|
||||||
}
|
|
||||||
foss {
|
foss {
|
||||||
dimension = "type"
|
dimension = "type"
|
||||||
buildConfigField "boolean", "FDROID_BUILD", "true"
|
buildConfigField "boolean", "FDROID_BUILD", "true"
|
||||||
|
@ -311,16 +308,6 @@ android {
|
||||||
java.srcDirs = ['src/main/java', 'src/play/java']
|
java.srcDirs = ['src/main/java', 'src/play/java']
|
||||||
manifest.srcFile 'src/play/AndroidManifest.xml'
|
manifest.srcFile 'src/play/AndroidManifest.xml'
|
||||||
}
|
}
|
||||||
e2ePlayDebug {
|
|
||||||
java.srcDirs = ['src/main/java', 'src/play/java']
|
|
||||||
res.srcDirs = ['src/experimental/res']
|
|
||||||
manifest.srcFile 'src/play/AndroidManifest.xml'
|
|
||||||
}
|
|
||||||
e2ePlayRelease {
|
|
||||||
java.srcDirs = ['src/main/java', 'src/play/java']
|
|
||||||
res.srcDirs = ['src/experimental/res']
|
|
||||||
manifest.srcFile 'src/play/AndroidManifest.xml'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
|
@ -385,8 +372,8 @@ dependencies {
|
||||||
implementation "com.github.bumptech.glide:glide:4.9.0"
|
implementation "com.github.bumptech.glide:glide:4.9.0"
|
||||||
annotationProcessor "com.github.bumptech.glide:compiler:4.9.0"
|
annotationProcessor "com.github.bumptech.glide:compiler:4.9.0"
|
||||||
implementation "com.tencent:mmkv-static:1.2.10"
|
implementation "com.tencent:mmkv-static:1.2.10"
|
||||||
androidTestImplementation('com.wix:detox:+') { transitive = true }
|
androidTestImplementation('com.wix:detox:+')
|
||||||
androidTestImplementation 'junit:junit:4.12'
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNewArchitectureEnabled()) {
|
if (isNewArchitectureEnabled()) {
|
||||||
|
|
|
@ -7,4 +7,8 @@
|
||||||
tools:ignore="AcceptsUserCertificates" />
|
tools:ignore="AcceptsUserCertificates" />
|
||||||
</trust-anchors>
|
</trust-anchors>
|
||||||
</base-config>
|
</base-config>
|
||||||
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
|
<domain includeSubdomains="true">10.0.2.2</domain>
|
||||||
|
<domain includeSubdomains="true">localhost</domain>
|
||||||
|
</domain-config>
|
||||||
</network-security-config>
|
</network-security-config>
|
|
@ -1,9 +1,5 @@
|
||||||
import org.apache.tools.ant.taskdefs.condition.Os
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
|
||||||
def safeExtGet(prop, fallback) {
|
|
||||||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
||||||
}
|
|
||||||
|
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
buildscript {
|
buildscript {
|
||||||
def taskRequests = getGradle().getStartParameter().getTaskRequests().toString().toLowerCase()
|
def taskRequests = getGradle().getStartParameter().getTaskRequests().toString().toLowerCase()
|
||||||
|
@ -75,5 +71,38 @@ allprojects {
|
||||||
google()
|
google()
|
||||||
maven { url 'https://maven.google.com' }
|
maven { url 'https://maven.google.com' }
|
||||||
maven { url 'https://www.jitpack.io' }
|
maven { url 'https://www.jitpack.io' }
|
||||||
|
|
||||||
|
// https://stackoverflow.com/a/74333788/5447468
|
||||||
|
// TODO: remove once we update RN
|
||||||
|
exclusiveContent {
|
||||||
|
// We get React Native's Android binaries exclusively through npm,
|
||||||
|
// from a local Maven repo inside node_modules/react-native/.
|
||||||
|
// (The use of exclusiveContent prevents looking elsewhere like Maven Central
|
||||||
|
// and potentially getting a wrong version.)
|
||||||
|
filter {
|
||||||
|
includeGroup "com.facebook.react"
|
||||||
|
}
|
||||||
|
forRepository {
|
||||||
|
maven {
|
||||||
|
// NOTE: if you are in a monorepo, you may have "$rootDir/../../../node_modules/react-native/android"
|
||||||
|
url "$rootDir/../node_modules/react-native/android"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
subprojects { subproject ->
|
||||||
|
afterEvaluate {
|
||||||
|
if (!project.name.equalsIgnoreCase("app") && project.hasProperty("android")) {
|
||||||
|
android {
|
||||||
|
compileSdkVersion 31
|
||||||
|
buildToolsVersion "31.0.0"
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion 23
|
||||||
|
targetSdkVersion 31
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -8,6 +8,5 @@ module.exports = {
|
||||||
globalTeardown: 'detox/runners/jest/globalTeardown',
|
globalTeardown: 'detox/runners/jest/globalTeardown',
|
||||||
reporters: ['detox/runners/jest/reporter'],
|
reporters: ['detox/runners/jest/reporter'],
|
||||||
testEnvironment: 'detox/runners/jest/testEnvironment',
|
testEnvironment: 'detox/runners/jest/testEnvironment',
|
||||||
verbose: true,
|
verbose: true
|
||||||
bail: 1
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
|
diff --git a/node_modules/expo-av/android/build.gradle b/node_modules/expo-av/android/build.gradle
|
||||||
|
index e6e3424..f1a6ddc 100644
|
||||||
|
--- a/node_modules/expo-av/android/build.gradle
|
||||||
|
+++ b/node_modules/expo-av/android/build.gradle
|
||||||
|
@@ -113,7 +113,7 @@ android {
|
||||||
|
packagingOptions {
|
||||||
|
// Gradle will add cmake target dependencies into packaging.
|
||||||
|
// Theses files are intermediated linking files to build reanimated and should not be in final package.
|
||||||
|
- excludes = [
|
||||||
|
+ excludes += [
|
||||||
|
"**/libc++_shared.so",
|
||||||
|
"**/libreactnativejni.so",
|
||||||
|
"**/libglog.so",
|
||||||
diff --git a/node_modules/expo-av/android/src/main/java/expo/modules/av/player/datasource/SharedCookiesDataSourceFactory.java b/node_modules/expo-av/android/src/main/java/expo/modules/av/player/datasource/SharedCookiesDataSourceFactory.java
|
diff --git a/node_modules/expo-av/android/src/main/java/expo/modules/av/player/datasource/SharedCookiesDataSourceFactory.java b/node_modules/expo-av/android/src/main/java/expo/modules/av/player/datasource/SharedCookiesDataSourceFactory.java
|
||||||
index 19818bc..ae4f631 100644
|
index 19818bc..ae4f631 100644
|
||||||
--- a/node_modules/expo-av/android/src/main/java/expo/modules/av/player/datasource/SharedCookiesDataSourceFactory.java
|
--- a/node_modules/expo-av/android/src/main/java/expo/modules/av/player/datasource/SharedCookiesDataSourceFactory.java
|
||||||
|
|
Loading…
Reference in New Issue