You've already forked 2ship2harkinian-Android
mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-03-10 11:20:47 -07:00
- bump SDL to 2.32.0
- bump NDK to r27c
- bump AGP to 8.8.0
- bump Gradle to 8.10.2
- bump CMake to 3.31.5
- bump targetSdkVersion to 34
- add GitHub Actions Release support (Debug)
- add Special External Storage Permission support
- fix "assets not found" error on first launch
- add Android 5 & 6 support
85 lines
2.4 KiB
Groovy
85 lines
2.4 KiB
Groovy
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY')
|
|
def buildAsApplication = !buildAsLibrary
|
|
if (buildAsApplication) {
|
|
apply plugin: 'com.android.application'
|
|
}
|
|
else {
|
|
apply plugin: 'com.android.library'
|
|
}
|
|
|
|
android {
|
|
ndkVersion '27.2.12479018'
|
|
compileSdkVersion 34
|
|
defaultConfig {
|
|
if (buildAsApplication) {
|
|
applicationId "com.dishii.mm"
|
|
}
|
|
minSdkVersion 21
|
|
//noinspection OldTargetApi
|
|
targetSdkVersion 34
|
|
versionCode 4
|
|
versionName "1.1.1"
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments "-DANDROID_APPNAME=${applicationId}", "-DANDROID_APP_PLATFORM=android-21", "-DANDROID_STL=c++_static", "-DHAVE_LD_VERSION_SCRIPT=OFF", "-DUSE_OPENGLES=ON", "-DCMAKE_BUILD_TYPE=$elfBuildType"
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
}
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
namespace 'com.dishii.mm'
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
applicationVariants.configureEach { 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'
|
|
version "3.31.5"
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if (buildAsLibrary) {
|
|
libraryVariants.all { variant ->
|
|
variant.outputs.each { output ->
|
|
def outputFile = output.outputFile
|
|
if (outputFile != null && outputFile.name.endsWith(".aar")) {
|
|
def fileName = "com.dishii.mm.aar"
|
|
output.outputFile = new File(outputFile.parent, fileName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation 'androidx.core:core:1.13.1'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
|
|
}
|
|
|
|
tasks.register('wrapper', Wrapper) {
|
|
gradleVersion = '8.10.2'
|
|
}
|
|
|
|
tasks.register('prepareKotlinBuildScriptModel') {
|
|
}
|