2022-07-26 01:30:17 +00:00
|
|
|
plugins {
|
|
|
|
id 'com.android.application'
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdk 32
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId 'com.alexbatalov.fallout2ce'
|
|
|
|
minSdk 21
|
|
|
|
targetSdk 32
|
2022-09-23 06:42:47 +00:00
|
|
|
versionCode 2
|
|
|
|
versionName '1.1.0'
|
2022-07-26 01:30:17 +00: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 17:04:37 +00: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-26 01:30:17 +00:00
|
|
|
buildTypes {
|
2022-07-29 17:04:37 +00:00
|
|
|
debug {
|
|
|
|
// Prevents signing keys clashes between debug and release versions
|
|
|
|
// for painless development.
|
|
|
|
applicationIdSuffix '.debug'
|
|
|
|
}
|
2022-07-26 01:30:17 +00:00
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
2022-07-29 17:04:37 +00:00
|
|
|
|
|
|
|
// Release signing config is optional and might not be present in CI
|
|
|
|
// builds, hence `findByName`.
|
|
|
|
signingConfig signingConfigs.findByName('release')
|
2022-07-26 01:30:17 +00: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')
|
2022-07-31 19:52:26 +00:00
|
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
2022-07-26 01:30:17 +00:00
|
|
|
}
|