mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-17 21:48:19 +00:00
d536bceed6
The minimum supported API version must be specified when building the native libraries, otherwise this may cause linking errors when launching the app. The minimum API level is increased to 24 (Android 7.0, covering 97.2% of usages) because: - Vulkan is only available from API 24+ on ARM64 and x64. - curl only compiles with API 23+. - The NDK version we use supports only API 21+. Ensure that the C++/Linker flags are set when building Android libraries, which was causing errors due to `-fPIC` not being set for all libraries.
77 lines
1.3 KiB
Groovy
77 lines
1.3 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
buildscript {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.3.0'
|
|
}
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(21))
|
|
}
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 34
|
|
defaultConfig {
|
|
applicationId "org.ddnet.client"
|
|
namespace("org.ddnet.client")
|
|
minSdkVersion 24
|
|
targetSdkVersion 34
|
|
versionCode TW_VERSION_CODE
|
|
versionName "TW_VERSION_NAME"
|
|
}
|
|
signingConfigs {
|
|
release {
|
|
storeFile file("TW_KEY_NAME")
|
|
storePassword "TW_KEY_PW"
|
|
keyAlias "TW_KEY_ALIAS"
|
|
keyPassword "TW_KEY_PW"
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
debug {
|
|
debuggable true
|
|
minifyEnabled false
|
|
shrinkResources false
|
|
}
|
|
}
|
|
packagingOptions {
|
|
jniLibs {
|
|
useLegacyPackaging = true
|
|
}
|
|
}
|
|
sourceSets {
|
|
main {
|
|
assets.srcDirs = ['assets']
|
|
jniLibs.srcDirs = ['lib']
|
|
}
|
|
}
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
|
}
|
|
}
|
|
}
|