mirror of
https://github.com/etlegacy/etlegacy-android.git
synced 2024-11-14 00:20:49 +00:00
81 lines
2.6 KiB
Groovy
Executable file
81 lines
2.6 KiB
Groovy
Executable file
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
|
|
def buildAsApplication = !buildAsLibrary
|
|
if (buildAsApplication) {
|
|
apply plugin: 'com.android.application'
|
|
}
|
|
else {
|
|
apply plugin: 'com.android.library'
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 26
|
|
defaultConfig {
|
|
if (buildAsApplication) {
|
|
applicationId "org.etlegacy.app"
|
|
}
|
|
minSdkVersion 21
|
|
targetSdkVersion 26
|
|
versionCode 1
|
|
versionName "1.0"
|
|
setProperty("archivesBaseName", "ETLegacy v-$versionName")
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments "-DCROSS_COMPILE32=OFF", "-DFEATURE_RENDERER2=OFF", "-DFEATURE_RENDERER_GLES=ON", "-DBUILD_SERVER=OFF", "-DINSTALL_EXTRA=OFF", "-DCMAKE_BUILD_TYPE=Release", "-DBUNDLED_LIBS=OFF", "-DBUNDLED_SDL=OFF", "-DBUNDLED_LUA=OFF", "-DFEATURE_LUA=OFF", "-DBUNDLED_OPENAL=OFF", "-DFEATURE_OPENAL=OFF", "-DBUNDLED_FREETYPE=OFF", "-DFEATURE_FREETYPE=OFF", "-DBUNDLED_GLEW=OFF", "-DRENDERER_DYNAMIC=OFF", "-DBUNDLED_JANSSON=OFF", "-DBUNDLED_THEORA=OFF", "-DFEATURE_THEORA=OFF"
|
|
//"-DANDROID_ARM_NEON=OFF"
|
|
}
|
|
}
|
|
ndk {
|
|
// Specifies the ABI configurations of your native
|
|
// libraries Gradle should build and package with your APK.
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
storeFile file("")
|
|
storePassword ""
|
|
keyAlias ""
|
|
keyPassword ""
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
|
|
sourceSets.main {
|
|
jniLibs.srcDir 'libs'
|
|
}
|
|
externalNativeBuild {
|
|
cmake {
|
|
path '/home/rafal/Pulpit/etlegacy/CMakeLists.txt'
|
|
}
|
|
}
|
|
|
|
}
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
if (buildAsLibrary) {
|
|
libraryVariants.all { variant ->
|
|
variant.outputs.each { output ->
|
|
def outputFile = output.outputFile
|
|
if (outputFile != null && outputFile.name.endsWith(".aar")) {
|
|
def fileName = "org.etlegacy.app.aar";
|
|
output.outputFile = new File(outputFile.parent, fileName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api 'com.github.erz05:JoyStick:1.1.0'
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
}
|