mirror of
https://github.com/love2d/love-android.git
synced 2026-08-12 08:31:04 +02:00
d257a3b987
* Target API level 34. * Update NDK to r25b. This will be the last NDK update to LOVE 11.x as future NDK dropped support for Android KitKat and earlier.
73 lines
2.0 KiB
Groovy
73 lines
2.0 KiB
Groovy
import java.nio.charset.StandardCharsets
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace "org.love2d.android.executable"
|
|
ndkVersion '25.2.9519653'
|
|
|
|
defaultConfig {
|
|
applicationId project.properties["app.application_id"]
|
|
versionCode project.properties["app.version_code"].toInteger()
|
|
versionName project.properties["app.version_name"]
|
|
minSdk 16
|
|
compileSdk 34
|
|
targetSdk 34
|
|
|
|
def getAppName = {
|
|
def nameArray = project.properties["app.name_byte_array"]
|
|
def name = project.properties["app.name"]
|
|
if (name != null && nameArray != null) {
|
|
throw new Exception("Only define either `app.name` or `app.name_byte_array` in gradle.properties, but not both!")
|
|
}
|
|
|
|
if (name == null) {
|
|
def nameArraySplit = nameArray.split(",")
|
|
def nameBytes = new byte[nameArraySplit.length]
|
|
def count = 0
|
|
for (String s: nameArraySplit) {
|
|
nameBytes[count++] = (byte) Integer.parseInt(s)
|
|
}
|
|
return new String(nameBytes, StandardCharsets.UTF_8)
|
|
}
|
|
return name
|
|
}
|
|
|
|
manifestPlaceholders = [
|
|
NAME:getAppName(),
|
|
ORIENTATION:project.properties["app.orientation"],
|
|
]
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
flavorDimensions = ['mode', 'recording']
|
|
productFlavors {
|
|
normal {
|
|
dimension 'mode'
|
|
}
|
|
embed {
|
|
dimension 'mode'
|
|
}
|
|
record {
|
|
dimension 'recording'
|
|
}
|
|
noRecord {
|
|
dimension 'recording'
|
|
}
|
|
}
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api 'androidx.multidex:multidex:2.0.1'
|
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
|
api 'androidx.appcompat:appcompat:1.6.1'
|
|
api project(':love')
|
|
}
|