fallout2-ce/os/android/app/build.gradle

101 lines
3.4 KiB
Groovy
Raw Normal View History

2022-07-25 18:30:17 -07:00
plugins {
id 'com.android.application'
}
android {
compileSdk 32
defaultConfig {
applicationId 'com.alexbatalov.fallout2ce'
minSdk 21
targetSdk 32
2024-04-21 02:46:24 -07:00
versionCode 4
versionName '1.3.0'
2022-07-25 18:30:17 -07:00
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_static'
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
// TODO: Remove once format issues are resolved.
cppFlags '-Wno-format-security'
// Specify target library explicitly as there is a shared zlib,
// that we don't need to be linked in.
targets 'fallout2-ce'
}
}
}
2022-07-29 10:04:37 -07:00
signingConfigs {
// Override default debug signing config to make sure every CI runner
// uses the same key for painless updates.
def debugKeystorePropertiesFile = rootProject.file('debug-keystore.properties')
if (debugKeystorePropertiesFile.exists()) {
def debugKeystoreProperties = new Properties()
debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile))
debug {
storeFile rootProject.file(debugKeystoreProperties.getProperty('storeFile'))
storePassword debugKeystoreProperties.getProperty('storePassword')
keyAlias debugKeystoreProperties.getProperty('keyAlias')
keyPassword debugKeystoreProperties.getProperty('keyPassword')
}
}
def releaseKeystoreProperties = new Properties()
def releaseKeystorePropertiesFile = rootProject.file('release-keystore.properties')
if (releaseKeystorePropertiesFile.exists()) {
releaseKeystoreProperties.load(new FileInputStream(releaseKeystorePropertiesFile))
release {
storeFile rootProject.file(releaseKeystoreProperties.getProperty('storeFile'))
storePassword releaseKeystoreProperties.getProperty('storePassword')
keyAlias releaseKeystoreProperties.getProperty('keyAlias')
keyPassword releaseKeystoreProperties.getProperty('keyPassword')
}
}
}
2022-07-25 18:30:17 -07:00
buildTypes {
2022-07-29 10:04:37 -07:00
debug {
// Prevents signing keys clashes between debug and release versions
// for painless development.
applicationIdSuffix '.debug'
}
2022-07-25 18:30:17 -07:00
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2022-07-29 10:04:37 -07:00
// Release signing config is optional and might not be present in CI
// builds, hence `findByName`.
signingConfig signingConfigs.findByName('release')
2022-07-25 18:30:17 -07:00
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
tasks["merge${variant.name.capitalize()}Assets"]
.dependsOn("externalNativeBuild${variant.name.capitalize()}")
}
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
sourceSets.main {
jniLibs.srcDir 'libs'
}
externalNativeBuild {
cmake {
path '../../../CMakeLists.txt'
}
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.documentfile:documentfile:1.0.1'
2022-07-25 18:30:17 -07:00
}