X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=android%2Fnative%2Fbuild.gradle;h=2ddc77135f7c6b01c33560a0735078adc1db6d34;hb=1fa4f58080b068920d7611291709377072d0cd00;hp=8ea6347b35a9c84df66c7a85a78e73c79acf3c3b;hpb=a7143c2a8c48b234d78ec666193b942ae0b62ca3;p=dragonfireclient.git diff --git a/android/native/build.gradle b/android/native/build.gradle index 8ea6347b3..2ddc77135 100644 --- a/android/native/build.gradle +++ b/android/native/build.gradle @@ -2,12 +2,12 @@ apply plugin: 'com.android.library' apply plugin: 'de.undercouch.download' android { - compileSdkVersion 29 + compileSdkVersion 30 buildToolsVersion '30.0.3' - ndkVersion '22.0.7026061' + ndkVersion "$ndk_version" defaultConfig { minSdkVersion 16 - targetSdkVersion 29 + targetSdkVersion 30 externalNativeBuild { ndkBuild { arguments '-j' + Runtime.getRuntime().availableProcessors(), @@ -41,58 +41,28 @@ android { arguments 'NDEBUG=1' } } + + ndk { + debugSymbolLevel 'SYMBOL_TABLE' + } } } } // get precompiled deps -def folder = 'minetest_android_deps_binaries' - task downloadDeps(type: Download) { - src 'https://github.com/minetest/' + folder + '/archive/master.zip' + src 'https://github.com/minetest/minetest_android_deps/releases/download/latest/deps.zip' dest new File(buildDir, 'deps.zip') overwrite false } task getDeps(dependsOn: downloadDeps, type: Copy) { - def deps = file('deps') - def f = file("$buildDir/" + folder + "-master") - - if (!deps.exists() && !f.exists()) { + def deps = new File(buildDir.parent, 'deps') + if (!deps.exists()) { + deps.mkdir() from zipTree(downloadDeps.dest) - into buildDir - } - - doLast { - if (!deps.exists()) { - file(f).renameTo(file(deps)) - } - } -} - -// get sqlite -def sqlite_ver = '3340000' -task downloadSqlite(dependsOn: getDeps, type: Download) { - src 'https://www.sqlite.org/2020/sqlite-amalgamation-' + sqlite_ver + '.zip' - dest new File(buildDir, 'sqlite.zip') - overwrite false -} - -task getSqlite(dependsOn: downloadSqlite, type: Copy) { - def sqlite = file('deps/Android/sqlite') - def f = file("$buildDir/sqlite-amalgamation-" + sqlite_ver) - - if (!sqlite.exists() && !f.exists()) { - from zipTree(downloadSqlite.dest) - into buildDir - } - - doLast { - if (!sqlite.exists()) { - file(f).renameTo(file(sqlite)) - } + into deps } } preBuild.dependsOn getDeps -preBuild.dependsOn getSqlite