Skip to content

Commit

Permalink
build.gradle.kts: register cleanup tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Sep 12, 2024
1 parent f552868 commit 68182a9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,21 @@ dependencies {

implementation(libs.jsnaploader)
}

// Register cleanup tasks:

tasks.named("clean") {
dependsOn("cleanDLLs", "cleanDyLibs", "cleanLogs", "cleanSOs")
}
tasks.register<Delete>("cleanDLLs") { // extracted Windows native libraries
delete(fileTree(".").matching{ include("*.dll") })
}
tasks.register<Delete>("cleanDyLibs") { // extracted macOS native libraries
delete(fileTree(".").matching{ include("*.dylib") })
}
tasks.register<Delete>("cleanLogs") { // JVM crash logs
delete(fileTree(".").matching{ include("hs_err_pid*.log") })
}
tasks.register<Delete>("cleanSOs") { // extracted Linux and Android native libraries
delete(fileTree(".").matching{ include("*.so") })
}

0 comments on commit 68182a9

Please sign in to comment.