mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 11:33:44 +01:00
7d20ff47d7
Also resync properly the dependencies versions. Don't let the makefile handle the cleanups itself. Let gradle do it. This is one of the first steps to remove the makefile and replace it with a full gradle support
125 lines
2.5 KiB
Groovy
125 lines
2.5 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
google()
|
|
}
|
|
dependencies {
|
|
classpath "com.android.tools.build:gradle:2.3.0"
|
|
}
|
|
}
|
|
|
|
def curl_version = "7.60.0"
|
|
def gmp_version = "6.1.2"
|
|
def irrlicht_revision = "5150"
|
|
def openal_version = "1.18.2"
|
|
def openssl_version = "1.0.2n"
|
|
def sqlite3_version = "3240000"
|
|
|
|
apply plugin: "com.android.application"
|
|
|
|
android {
|
|
compileSdkVersion 26
|
|
buildToolsVersion "26.0.3"
|
|
|
|
defaultConfig {
|
|
versionCode 20
|
|
versionName "${System.env.VERSION_STR}.${versionCode}"
|
|
minSdkVersion 14
|
|
targetSdkVersion 14
|
|
applicationId "net.minetest.minetest"
|
|
manifestPlaceholders = [ package: "net.minetest.minetest", project: project.name ]
|
|
ndk {
|
|
// Specifies the ABI configurations of your native
|
|
// libraries Gradle should build and package with your APK.
|
|
abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a',
|
|
'arm64-v8a'
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task cleanAssets(type:Delete) {
|
|
delete 'src/main/assets'
|
|
}
|
|
|
|
task cleanIconv(type:Delete) {
|
|
delete 'deps/libiconv'
|
|
}
|
|
|
|
task cleanIrrlicht(type:Delete) {
|
|
delete 'deps/irrlicht'
|
|
}
|
|
|
|
task cleanLevelDB(type:Delete) {
|
|
delete 'deps/leveldb'
|
|
}
|
|
|
|
task cleanCURL(type:Delete) {
|
|
delete 'deps/curl'
|
|
delete 'deps/curl-' + curl_version
|
|
}
|
|
|
|
task cleanOpenSSL(type:Delete) {
|
|
delete 'deps/openssl'
|
|
delete 'deps/openssl-' + openssl_version
|
|
delete 'deps/openssl-' + openssl_version + '.tar.gz'
|
|
}
|
|
|
|
task cleanOpenAL(type:Delete) {
|
|
delete 'deps/openal-soft'
|
|
}
|
|
|
|
task cleanFreetype(type:Delete) {
|
|
delete 'deps/freetype2-android'
|
|
}
|
|
|
|
task cleanOgg(type:Delete) {
|
|
delete 'deps/libvorbis-libogg-android'
|
|
}
|
|
|
|
task cleanSQLite3(type:Delete) {
|
|
delete 'deps/sqlite-amalgamation-' + sqlite3_version
|
|
delete 'deps/sqlite-amalgamation-' + sqlite3_version + '.zip'
|
|
}
|
|
|
|
task cleanGMP(type:Delete) {
|
|
delete 'deps/gmp'
|
|
delete 'deps/gmp-' + gmp_version
|
|
}
|
|
|
|
task cleanAll(type:Delete, dependsOn:[clean,cleanAssets,cleanIconv,
|
|
cleanFreetype,cleanIrrlicht,cleanLevelDB,cleanSQLite3,cleanCURL,
|
|
cleanOpenSSL,cleanOpenAL,cleanOgg,cleanGMP]) {
|
|
delete 'deps'
|
|
delete 'gen'
|
|
delete 'libs'
|
|
delete 'obj'
|
|
delete 'bin'
|
|
delete 'Debug'
|
|
delete 'and_env'
|
|
}
|