diff options
author | sfan5 <sfan5@live.de> | 2023-02-23 11:32:42 +0100 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2023-03-02 19:57:18 +0100 |
commit | fee2e3ee27a36c9a33e3cd75c676a0edc33ccac5 (patch) | |
tree | ea2018961d90d34f110298b17aaa0dd7565fdb7f /android/native | |
parent | a93f3542d92e87c3d728f067358e6f42b31cfe96 (diff) | |
download | minetest-fee2e3ee27a36c9a33e3cd75c676a0edc33ccac5.tar.xz |
Fix task ordering and more in Gradle Android build
Diffstat (limited to 'android/native')
-rw-r--r-- | android/native/build.gradle | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/android/native/build.gradle b/android/native/build.gradle index 6caec1379..452005164 100644 --- a/android/native/build.gradle +++ b/android/native/build.gradle @@ -52,18 +52,23 @@ android { // get precompiled deps task downloadDeps(type: Download) { + def depsDir = new File(buildDir.parent, 'deps') + def depsZip = new File(buildDir, 'deps.zip') + src 'https://github.com/minetest/minetest_android_deps/releases/download/latest/deps.zip' - dest new File(buildDir, 'deps.zip') + dest depsZip overwrite false -} -task getDeps(dependsOn: downloadDeps, type: Copy) { - def deps = new File(buildDir.parent, 'deps') - if (!deps.exists()) { - deps.mkdir() - from zipTree(downloadDeps.dest) - into deps + task getDeps(dependsOn: downloadDeps, type: Copy) { + depsDir.mkdir() + from zipTree(depsZip) + into depsDir + doFirst { logger.lifecycle('Extracting to {}', depsDir) } } } preBuild.dependsOn getDeps + +clean { + delete new File(buildDir.parent, 'deps') +} |