mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-30 08:11:17 +00:00
21 lines
649 B
Groovy
21 lines
649 B
Groovy
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"
|
|
}
|