gradle: added taks for building pak3_ files, some tweaks in cmake arguments, added block to make apk signed (issues with installing on android devices when apk isn't signed)

This commit is contained in:
rafal1137 2019-01-18 19:26:24 +01:00
parent 02104613cf
commit eb4e9fb115

26
app/build.gradle Normal file → Executable file
View file

@ -7,6 +7,19 @@ else {
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
} }
task pk3(type: Zip) {
archiveName = "pak3_v2.76_dirty.pk3"
destinationDir = file("$projectDir/src/main/assets/")
from "$projectDir/../../etlegacy/etmain/"
}
tasks.whenTaskAdded { task ->
if (task.name == 'assembleRelease') {
task.dependsOn pk3
}
}
android { android {
compileSdkVersion 26 compileSdkVersion 26
defaultConfig { defaultConfig {
@ -19,7 +32,7 @@ android {
versionName "1.0" versionName "1.0"
externalNativeBuild { externalNativeBuild {
cmake { cmake {
arguments "-DCROSS_COMPILE32=OFF", "-DFEATURE_RENDERER2=OFF", "-DFEATURE_RENDERER_GLES=ON", "-DBUILD_SERVER=OFF", "-DINSTALL_EXTRA=OFF", "-DCMAKE_BUILD_TYPE=Release", "-DBUNDLED_LIBS=ON", "-DBUNDLED_SDL=OFF", "-DFEATURE_LUA=OFF", "-DRENDERER_DYNAMIC=OFF", "-DCMAKE_C_FLAGS= -std=gnu99" 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" //"-DANDROID_ARM_NEON=OFF"
} }
} }
@ -29,8 +42,19 @@ android {
abiFilters 'armeabi-v7a', 'arm64-v8a' abiFilters 'armeabi-v7a', 'arm64-v8a'
} }
} }
signingConfigs {
release {
storeFile file("")
storePassword ""
keyAlias ""
keyPassword ""
}
}
buildTypes { buildTypes {
release { release {
signingConfig signingConfigs.release
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }