Files

128 lines
3.6 KiB
Groovy

apply plugin: 'com.android.application'
apply plugin: 'com.facebook.react'
apply plugin: 'kotlin-android'
apply from: '../../../android/rninfo.gradle'
react {
if (rnInfo.isRN75OrHigher) {
autolinkLibrariesWithApp()
}
}
android {
namespace 'com.example'
buildToolsVersion = rootProject.ext.buildToolsVersion
compileSdk = rootProject.ext.compileSdkVersion
if (rnInfo.isRN72OrHigher) {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
} else {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
}
defaultConfig {
applicationId 'com.wix.detox.test'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName '1.0'
ndk {
abiFilters 'armeabi-v7a', 'x86', 'x86_64', 'arm64-v8a'
}
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'com.example.DetoxTestAppJUnitRunner'
/*
testInstrumentationRunnerArguments = [
'detoxServer': 'ws://localhost:8099',
'detoxSessionId': 'test'
]
*/
missingDimensionStrategy 'detox', 'full'
}
splits {
abi {
reset()
enable false
universalApk false // If true, also generate a universal APK
include 'armeabi-v7a', 'x86', 'x86_64', 'arm64-v8a'
}
}
signingConfigs {
release {
storeFile file("keystore.jks")
storePassword "12345678"
keyAlias "key0"
keyPassword "12345678"
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', "${project(':detox').projectDir}/proguard-rules-app.pro"
signingConfig signingConfigs.release
}
}
packagingOptions {
pickFirst '**/libc++_shared.so'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
buildFeatures {
buildConfig = true
}
}
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation('com.facebook.react:react-android')
implementation "androidx.appcompat:appcompat:${rootProject.ext.appCompatVersion}"
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
androidTestImplementation(project(path: ':detox'))
androidTestImplementation 'com.github.wix-incubator:detox-butler:1.0.4'
}
// Apply Hermes as our JS engine
dependencies {
implementation('com.facebook.react:hermes-android')
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.implementation
into 'libs'
}
if (!ext.rnInfo.isRN75OrHigher) {
// For versions below 0.75, we need to apply the old plugin
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
}