1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-22 10:51:28 +00:00
syncthing-android/syncthing/build.gradle.kts
Adam Szewera 9ed273a32e
Refactor groovy gradle files to kotlin dsl (#2022)
## Description:
Refactor gradle build files to use Kotlin DSL instead of Groovy.
There were also a bash script and a python script that needed to be
updated because they relied on parsing the `build.gradle` files written
in Groovy.

This PR completes the work started in:
https://github.com/syncthing/syncthing-android/pull/2000
2023-12-28 22:37:27 +01:00

21 lines
638 B
Text

import ru.vyarus.gradle.plugin.python.task.PythonTask
plugins {
id("ru.vyarus.use-python") version "3.0.0"
}
tasks.register<PythonTask>("buildNative") {
val ndkVersionShared = rootProject.extra.get("ndkVersionShared")
environment("NDK_VERSION", "$ndkVersionShared")
inputs.dir("$projectDir/src/")
outputs.dir("$projectDir/../app/src/main/jniLibs/")
command = "-u ./build-syncthing.py"
}
/**
* Use separate task instead of standard clean(), so these folders aren't deleted by `gradle clean`.
*/
tasks.register<Delete>("cleanNative") {
delete("$projectDir/../app/src/main/jniLibs/")
delete("gobuild")
}