Files

84 lines
2.4 KiB
Groovy

apply plugin: 'com.android.application'
apply plugin: 'com.facebook.react'
apply plugin: 'kotlin-android'
react {
autolinkLibrariesWithApp()
}
android {
namespace 'com.example'
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion = rootProject.ext.buildToolsVersion
println("[$project] Using buildToolsVersion $buildToolsVersion")
defaultConfig {
applicationId 'com.detox.rn.example'
versionCode 1
versionName '1.0'
compileSdk rootProject.ext.compileSdkVersion
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
ndk {
abiFilters 'armeabi-v7a', 'x86', 'x86_64', 'arm64-v8a'
}
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'com.example.DetoxTestAppJUnitRunner'
}
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'
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
signingConfig signingConfigs.release
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.facebook.react:react-android'
// Apply Hermes as the JS engine
implementation 'com.facebook.react:hermes-android'
// noinspection GradleDynamicVersion
androidTestImplementation 'com.wix:detox:+'
androidTestImplementation 'com.github.wix-incubator:detox-butler:1.0.4'
}