2018-11-06 11:28:47 +00:00
|
|
|
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
|
|
|
|
def buildAsApplication = !buildAsLibrary
|
|
|
|
if (buildAsApplication) {
|
2018-11-06 14:37:52 +00:00
|
|
|
apply plugin: 'com.android.application'
|
2018-11-06 11:28:47 +00:00
|
|
|
}
|
|
|
|
else {
|
2018-11-06 14:37:52 +00:00
|
|
|
apply plugin: 'com.android.library'
|
2018-11-06 11:28:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 26
|
|
|
|
defaultConfig {
|
|
|
|
if (buildAsApplication) {
|
|
|
|
applicationId "org.etlegacy.app"
|
|
|
|
}
|
2020-03-31 00:23:55 +00:00
|
|
|
minSdkVersion 21
|
2018-11-06 11:28:47 +00:00
|
|
|
targetSdkVersion 26
|
|
|
|
versionCode 1
|
|
|
|
versionName "1.0"
|
2019-05-22 09:00:38 +00:00
|
|
|
setProperty("archivesBaseName", "ETLegacy v-$versionName")
|
2018-11-06 11:28:47 +00:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
2019-01-18 18:26:24 +00:00
|
|
|
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"
|
2018-11-25 20:04:05 +00:00
|
|
|
//"-DANDROID_ARM_NEON=OFF"
|
2018-11-06 11:28:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
ndk {
|
|
|
|
// Specifies the ABI configurations of your native
|
|
|
|
// libraries Gradle should build and package with your APK.
|
2018-11-12 14:57:29 +00:00
|
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
2018-11-06 11:28:47 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-18 18:26:24 +00:00
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
storeFile file("")
|
|
|
|
storePassword ""
|
|
|
|
keyAlias ""
|
|
|
|
keyPassword ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-06 11:28:47 +00:00
|
|
|
buildTypes {
|
|
|
|
release {
|
2019-01-18 18:26:24 +00:00
|
|
|
signingConfig signingConfigs.release
|
2018-11-06 11:28:47 +00:00
|
|
|
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 {
|
2019-08-04 14:16:40 +00:00
|
|
|
api 'com.github.erz05:JoyStick:1.1.0'
|
2018-11-06 11:28:47 +00:00
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
|
|
}
|