Skip to content

Commit 579c7fd

Browse files
authored
build: add cleanBin task in build.gradle.kts (#1232)
1 parent eee1e84 commit 579c7fd

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ hs_err_pid*
2626
/build
2727
/idea-plugin/build
2828
/idea-plugin/idea-sandbox/
29+
/idea-plugin/bin/
2930

3031
\.DS_Store
3132

idea-plugin/build.gradle.kts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,21 @@ tasks {
122122
sinceBuild.set(intellijSince)
123123
untilBuild.set("")
124124
}
125+
126+
// Add a task to clean the bin directory
127+
register<Delete>("cleanBin") {
128+
delete("bin")
129+
doLast {
130+
println("Cleaned bin directory")
131+
}
132+
}
133+
134+
// Hook into existing tasks
135+
getByName("clean") {
136+
dependsOn("cleanBin")
137+
}
138+
139+
getByName("build") {
140+
finalizedBy("cleanBin")
141+
}
125142
}

0 commit comments

Comments
 (0)