Skip to content

Commit

Permalink
Skip Android deps download if they already exist
Browse files Browse the repository at this point in the history
It's close to impossible to test locally built changes otherwise.
  • Loading branch information
sfan5 committed Mar 9, 2024
1 parent d88f086 commit 58bf4f0
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions android/native/build.gradle
Expand Up @@ -43,19 +43,25 @@ android {
}

// get precompiled deps
task downloadDeps(type: Download) {
def depsDir = new File(buildDir.parent, 'deps')
def depsZip = new File(buildDir, 'deps.zip')
def depsDir = new File(buildDir.parent, 'deps')
if (new File(depsDir, 'armeabi-v7a').exists()) {
task getDeps {
doLast { logger.lifecycle('Using existing deps from {}', depsDir) }
}
} else {
task downloadDeps(type: Download) {
def depsZip = new File(buildDir, 'deps.zip')

src 'https://github.com/minetest/minetest_android_deps/releases/download/latest/deps.zip'
dest depsZip
overwrite false
src 'https://github.com/minetest/minetest_android_deps/releases/download/latest/deps.zip'
dest depsZip
overwrite false

task getDeps(dependsOn: downloadDeps, type: Copy) {
depsDir.mkdir()
from zipTree(depsZip)
into depsDir
doFirst { logger.lifecycle('Extracting to {}', depsDir) }
task getDeps(dependsOn: downloadDeps, type: Copy) {
depsDir.mkdir()
from zipTree(depsZip)
into depsDir
doFirst { logger.lifecycle('Extracting to {}', depsDir) }
}
}
}

Expand Down

0 comments on commit 58bf4f0

Please sign in to comment.