Files
PSX2/app/build.gradle
T
2025-11-14 03:02:29 -05:00

132 lines
3.9 KiB
Groovy

plugins {
id 'com.android.application'
}
// Load keystore properties
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
namespace = 'com.izzy2lost.psx2'
compileSdk = 36
ndkVersion = '28.2.13676358'
signingConfigs {
release {
if (keystorePropertiesFile.exists()) {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
}
defaultConfig {
applicationId = "com.izzy2lost.psx2"
minSdk = 26
targetSdk = 36
versionCode 16
versionName "1.1.4"
// APK
base.archivesName = "PSX2_${versionCode}_${new Date().format('yyyyMMddHHmm')}"
externalNativeBuild {
cmake {
// Avoid LTO core on Android to prevent x86 objects from leaking into arm64 link
arguments(
'-DANDROID=true',
'-DCMAKE_BUILD_TYPE=Release',
'-DANDROID_STL=c++_static',
'-DPCSX2_PROFILER=OFF'
)
}
}
ndk {
//noinspection ChromeOsAbiSupport
abiFilters 'arm64-v8a'
}
}
buildTypes {
release {
minifyEnabled = true
shrinkResources = true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
ndk {
debugSymbolLevel 'SYMBOL_TABLE'
}
}
debug {
minifyEnabled = false
shrinkResources = false
debuggable = true
}
}
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = true
}
}
// Relax lint for test release builds
lint {
checkReleaseBuilds = false
abortOnError = false
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
coreLibraryDesugaringEnabled = true
}
externalNativeBuild {
cmake {
version '3.22.1'
path file('src/main/cpp/CMakeLists.txt')
}
}
packagingOptions {
jniLibs {
useLegacyPackaging = true
keepDebugSymbols += ['**/*.so']
}
resources {
excludes += ['META-INF/DEPENDENCIES', 'META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/NOTICE', 'META-INF/NOTICE.txt']
}
}
buildToolsVersion = '36.0.0'
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'com.google.android.material:material:1.14.0-alpha04'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.documentfile:documentfile:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.4.0'
implementation 'androidx.activity:activity:1.10.1'
implementation 'androidx.core:core-ktx:1.15.0'
implementation 'com.github.bumptech.glide:glide:4.16.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
}
def javaToolchainService = project.extensions.getByType(org.gradle.jvm.toolchain.JavaToolchainService)
tasks.withType(org.gradle.api.tasks.compile.JavaCompile).configureEach {
javaCompiler = javaToolchainService.compilerFor {
languageVersion = org.gradle.jvm.toolchain.JavaLanguageVersion.of(21)
}
}