123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- buildscript {
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.1'
- }
- }
- allprojects {
- repositories {
- google()
- jcenter()
- }
- }
- 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"
- apply plugin: "com.android.application"
- android {
- compileSdkVersion 29
- buildToolsVersion '29.0.2'
- defaultConfig {
- versionCode 25
- versionName "${System.env.VERSION_STR}.${versionCode}"
- minSdkVersion 14
- targetSdkVersion 29
- 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 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
- abiFilters 'armeabi-v7a', 'x86', 'arm64-v8a'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- 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 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"
- }
- }
- }
- 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 cleanAll(type: Delete, dependsOn: [clean, cleanAssets, cleanIconv,
- cleanFreetype, cleanIrrlicht, cleanLevelDB, cleanSQLite3, cleanCURL,
- cleanOpenSSL, cleanOpenAL, cleanOgg]) {
- delete 'deps'
- delete 'gen'
- delete 'libs'
- delete 'obj'
- delete 'bin'
- delete 'Debug'
- delete 'and_env'
- }
- dependencies {
- implementation 'androidx.core:core:1.1.0'
- }
|