From e65ba067e0d45037861ff0be9ced7b683eeeaf42 Mon Sep 17 00:00:00 2001 From: yijhenlin <44198696+yijhenlin@users.noreply.github.com> Date: Fri, 15 Mar 2024 01:32:55 +0800 Subject: [PATCH] [#2508] improvement: Remove untracked directories when executing gradle clean (#2531) ### What changes were proposed in this pull request? Remove directory `spark-warehouse` when exectue gradle clean in moudle catalog-lakehouse-iceberg. Remove directory `src/main/resources` when execute gradle clean in module server, since which is generated by gradle build. ### Why are the changes needed? Fix: #2508 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? `./gradlew :catalogs:catalog-lakehouse-iceberg:clean` `./gradlew :server:clean` --------- Co-authored-by: Qi Yu --- .gitignore | 3 ++- catalogs/catalog-lakehouse-iceberg/build.gradle.kts | 4 ++++ server/build.gradle.kts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index db5db7b9f41..e9956fee835 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,5 @@ include web/.gitignore .node # integration test -integration-test/metastore_db \ No newline at end of file +integration-test/metastore_db +catalogs/catalog-lakehouse-iceberg/spark-warehouse diff --git a/catalogs/catalog-lakehouse-iceberg/build.gradle.kts b/catalogs/catalog-lakehouse-iceberg/build.gradle.kts index ae61b173cca..f42b7c24941 100644 --- a/catalogs/catalog-lakehouse-iceberg/build.gradle.kts +++ b/catalogs/catalog-lakehouse-iceberg/build.gradle.kts @@ -168,3 +168,7 @@ tasks.test { init(this) } } + +tasks.clean { + delete("spark-warehouse") +} diff --git a/server/build.gradle.kts b/server/build.gradle.kts index a9920a0dc34..9400188fdfd 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -114,6 +114,6 @@ tasks { environment("GRAVITINO_TEST", "true") } clean { - delete("$propertiesFile") + delete(file(propertiesFile).getParentFile()) } }