1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-28 22:01:31 +00:00
syncthing-android/syncthing/build.gradle

22 lines
649 B
Groovy
Raw Normal View History

import org.gradle.internal.os.OperatingSystem
task buildNative(type: Exec) {
outputs.upToDateWhen { false }
if (OperatingSystem.current().isWindows()) {
if (!file("../app/src/main/jniLibs").exists()) {
throw new GradleException('Please run ./build-syncthing.bash via cygwin/MinGW manually')
}
executable = 'rundll32' // Does nothing
} else {
executable = './build-syncthing.bash'
}
}
/**
* Use separate task instead of standard clean(), so these folders aren't deleted by `gradle clean`.
*/
task cleanNative(type: Delete) {
delete "../app/src/main/jniLibs/"
delete "gobuild"
}