feat: also delete jni folder on clean

This commit is contained in:
zaaarf 2023-08-28 12:22:37 +02:00
parent fb8faffe2e
commit c3896ca997
No known key found for this signature in database
GPG key ID: 6445A5CD15E5B40C

View file

@ -41,6 +41,8 @@ tasks {
}
//define rust tasks
def jniSourcesFolder = 'src/main/java/com/codemp/intellij/jni'
tasks.register('cargoBuild', Exec) {
workingDir '.'
commandLine 'cargo', 'build'
@ -48,6 +50,12 @@ tasks.register('cargoBuild', Exec) {
compileJava.dependsOn cargoBuild
tasks.register('prepareJniFolder') {
mkdir jniSourcesFolder
}
cargoBuild.dependsOn prepareJniFolder
tasks.register('cargoClean', Exec) {
workingDir '.'
commandLine 'cargo', 'clean'
@ -55,3 +63,8 @@ tasks.register('cargoClean', Exec) {
clean.dependsOn cargoClean
tasks.register('deleteGeneratedNativeInterface', Delete) {
delete jniSourcesFolder
}
cargoClean.dependsOn deleteGeneratedNativeInterface