2016-04-13 20:14:04 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2019-08-12 18:59:53 +02:00
|
|
|
google()
|
2018-12-03 00:39:35 +01:00
|
|
|
jcenter()
|
2016-04-13 20:14:04 +02:00
|
|
|
}
|
|
|
|
dependencies {
|
2019-08-12 18:59:53 +02:00
|
|
|
classpath 'com.android.tools.build:gradle:3.4.2'
|
2018-12-03 00:39:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
2019-08-12 18:59:53 +02:00
|
|
|
google()
|
2018-12-03 00:39:35 +01:00
|
|
|
jcenter()
|
2016-04-13 20:14:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-01 12:23:38 +02:00
|
|
|
def curl_version = "7.60.0"
|
|
|
|
def irrlicht_revision = "5150"
|
|
|
|
def openal_version = "1.18.2"
|
|
|
|
def openssl_version = "1.0.2n"
|
|
|
|
def sqlite3_version = "3240000"
|
|
|
|
|
2016-04-13 20:14:04 +02:00
|
|
|
apply plugin: "com.android.application"
|
|
|
|
|
|
|
|
android {
|
2018-12-03 00:39:35 +01:00
|
|
|
compileSdkVersion 28
|
2016-04-13 20:14:04 +02:00
|
|
|
|
|
|
|
defaultConfig {
|
2019-10-12 15:48:58 +02:00
|
|
|
versionCode 24
|
2016-04-13 20:14:04 +02:00
|
|
|
versionName "${System.env.VERSION_STR}.${versionCode}"
|
2017-11-15 20:52:19 +01:00
|
|
|
minSdkVersion 14
|
2018-12-03 00:39:35 +01:00
|
|
|
targetSdkVersion 28
|
2016-04-13 20:14:04 +02:00
|
|
|
applicationId "net.minetest.minetest"
|
2018-12-03 00:39:35 +01:00
|
|
|
manifestPlaceholders = [package: "net.minetest.minetest", project: project.name]
|
2018-03-11 16:52:53 +01:00
|
|
|
ndk {
|
|
|
|
// Specifies the ABI configurations of your native
|
|
|
|
// libraries Gradle should build and package with your APK.
|
2018-12-03 00:39:35 +01:00
|
|
|
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
|
|
abiFilters 'armeabi-v7a', 'x86'
|
2018-03-11 16:52:53 +01:00
|
|
|
}
|
2016-04-13 20:14:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
disable "OldTargetApi", "GoogleAppIndexingWarning"
|
|
|
|
}
|
|
|
|
|
|
|
|
Properties props = new Properties()
|
|
|
|
props.load(new FileInputStream(file("local.properties")))
|
|
|
|
|
|
|
|
if (props.getProperty("keystore") != null) {
|
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
storeFile file(props["keystore"])
|
|
|
|
storePassword props["keystore.password"]
|
|
|
|
keyAlias props["key"]
|
|
|
|
keyPassword props["key.password"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-07-01 12:23:38 +02:00
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanAssets(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'src/main/assets'
|
|
|
|
}
|
|
|
|
|
2018-12-05 20:08:46 +01:00
|
|
|
task copyAssets {
|
|
|
|
dependsOn 'cleanAssets'
|
|
|
|
mkdir "src/main/assets"
|
|
|
|
|
|
|
|
def mtAssetsFolder = "src/main/assets/Minetest"
|
|
|
|
def projRoot = "../.."
|
|
|
|
def gameToCopy = "minetest_game"
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
mkdir "${mtAssetsFolder}"
|
|
|
|
mkdir "${mtAssetsFolder}/client"
|
|
|
|
mkdir "${mtAssetsFolder}/fonts"
|
|
|
|
mkdir "${mtAssetsFolder}/games"
|
|
|
|
mkdir "${mtAssetsFolder}/media"
|
|
|
|
|
|
|
|
copy {
|
|
|
|
from "${projRoot}/minetest.conf.example", "${projRoot}/README.md" into mtAssetsFolder
|
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "${projRoot}/doc/lgpl-2.1.txt" into "${mtAssetsFolder}/LICENSE.txt"
|
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "${projRoot}/builtin" into "${mtAssetsFolder}/builtin"
|
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "${projRoot}/client/shaders" into "${mtAssetsFolder}/client/shaders"
|
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "${projRoot}/fonts" include "*.ttf" into "${mtAssetsFolder}/fonts"
|
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "${projRoot}/games/${gameToCopy}" into "${mtAssetsFolder}/games/${gameToCopy}"
|
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "${projRoot}/po" into "${mtAssetsFolder}/po"
|
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "${projRoot}/textures" into "${mtAssetsFolder}/textures"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanIconv(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps/libiconv'
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanIrrlicht(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps/irrlicht'
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanLevelDB(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps/leveldb'
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanCURL(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps/curl'
|
|
|
|
delete 'deps/curl-' + curl_version
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanOpenSSL(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps/openssl'
|
|
|
|
delete 'deps/openssl-' + openssl_version
|
|
|
|
delete 'deps/openssl-' + openssl_version + '.tar.gz'
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanOpenAL(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps/openal-soft'
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanFreetype(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps/freetype2-android'
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanOgg(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps/libvorbis-libogg-android'
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanSQLite3(type: Delete) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps/sqlite-amalgamation-' + sqlite3_version
|
|
|
|
delete 'deps/sqlite-amalgamation-' + sqlite3_version + '.zip'
|
|
|
|
}
|
|
|
|
|
2018-12-03 00:39:35 +01:00
|
|
|
task cleanAll(type: Delete, dependsOn: [clean, cleanAssets, cleanIconv,
|
2018-12-05 20:08:46 +01:00
|
|
|
cleanFreetype, cleanIrrlicht, cleanLevelDB, cleanSQLite3, cleanCURL,
|
2019-01-04 16:41:42 +01:00
|
|
|
cleanOpenSSL, cleanOpenAL, cleanOgg]) {
|
2018-07-01 12:23:38 +02:00
|
|
|
delete 'deps'
|
|
|
|
delete 'gen'
|
|
|
|
delete 'libs'
|
|
|
|
delete 'obj'
|
|
|
|
delete 'bin'
|
|
|
|
delete 'Debug'
|
|
|
|
delete 'and_env'
|
|
|
|
}
|
2018-12-03 00:39:35 +01:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation 'com.android.support:support-v4:28.0.0'
|
|
|
|
}
|