2025-11-22 15:21:31 +03:00
|
|
|
plugins {
|
|
|
|
|
id 'com.android.application'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
namespace 'com.nanodata.armsx'
|
|
|
|
|
compileSdk rootProject.ext.compileSdkVersion
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
applicationId 'com.nanodata.armsx'
|
|
|
|
|
minSdk rootProject.ext.minSdkVersion
|
|
|
|
|
targetSdk rootProject.ext.targetSdkVersion
|
|
|
|
|
versionCode 1
|
|
|
|
|
versionName '0.1.0'
|
|
|
|
|
vectorDrawables.useSupportLibrary = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
|
debug {
|
|
|
|
|
storeFile file("debug.keystore")
|
|
|
|
|
storePassword "android"
|
|
|
|
|
keyAlias "androiddebugkey"
|
|
|
|
|
keyPassword "android"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
debug {
|
|
|
|
|
matchingFallbacks = ['release']
|
|
|
|
|
}
|
|
|
|
|
release {
|
|
|
|
|
signingConfig signingConfigs.debug
|
|
|
|
|
minifyEnabled false
|
|
|
|
|
shrinkResources false
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
|
resources {
|
|
|
|
|
excludes += ['META-INF/DEPENDENCIES']
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
buildConfig true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
|
main {
|
|
|
|
|
java.srcDirs += ['../../third_party/SDL/android-project/app/src/main/java']
|
|
|
|
|
res.srcDirs += ['src/main/res', '../../third_party/SDL/android-project/app/src/main/res']
|
|
|
|
|
assets.srcDirs += ['src/main/assets']
|
2025-11-23 05:24:54 +03:00
|
|
|
jniLibs.srcDirs += ['src/main/jniLibs']
|
2025-11-22 15:21:31 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
|
|
|
|
}
|
2025-11-23 05:24:54 +03:00
|
|
|
|
|
|
|
|
def repoRootDir = rootProject.projectDir.parentFile
|
|
|
|
|
def nativeOutput = file("$projectDir/src/main/jniLibs/arm64-v8a/libarmsx.so")
|
2026-04-07 08:30:44 +02:00
|
|
|
def skipNativePrepare = System.getenv("ARMSX_SKIP_NATIVE_PREPARE") == "1"
|
2025-11-23 05:24:54 +03:00
|
|
|
|
|
|
|
|
tasks.register("prepareNativeBinaries") {
|
|
|
|
|
group = "native"
|
|
|
|
|
description = "Build SDL2/libarmsx via build.sh android."
|
|
|
|
|
inputs.file(new File(repoRootDir, "build.sh"))
|
|
|
|
|
outputs.file(nativeOutput)
|
2026-04-07 08:30:44 +02:00
|
|
|
onlyIf { !skipNativePrepare }
|
2025-11-23 05:24:54 +03:00
|
|
|
doLast {
|
|
|
|
|
exec {
|
|
|
|
|
workingDir repoRootDir
|
|
|
|
|
commandLine "./build.sh", "android"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
preBuild.dependsOn(tasks.named("prepareNativeBinaries"))
|