Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#1507] improvement(clients, catalogs): Remove unnecessary build directory of project `catalogs` and `clients` (#1508)

Qi Yu3fb0049154a3
diff --git a/build.gradle.kts b/build.gradle.kts
index 858558943a..b585bddc6d 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -88,39 +88,40 @@ licenseReport {
repositories { mavenCentral() }
allprojects {
- apply(plugin = "com.diffplug.spotless")
-
- repositories {
- mavenCentral()
- mavenLocal()
- }
+ if ((project.name != "catalogs") && project.name != "clients") {
+ apply(plugin = "com.diffplug.spotless")
+ repositories {
+ mavenCentral()
+ mavenLocal()
+ }
- plugins.withType<com.diffplug.gradle.spotless.SpotlessPlugin>().configureEach {
- configure<com.diffplug.gradle.spotless.SpotlessExtension> {
- java {
- // Fix the Google Java Format version to 1.7. Since JDK8 only support Google Java Format
- // 1.7, which is not compatible with JDK17. We will use a newer version when we upgrade to
- // JDK17.
- googleJavaFormat("1.7")
- removeUnusedImports()
- trimTrailingWhitespace()
- replaceRegex(
- "Remove wildcard imports",
- "import\\s+[^\\*\\s]+\\*;(\\r\\n|\\r|\\n)",
- "$1"
- )
- replaceRegex(
- "Remove static wildcard imports",
- "import\\s+(?:static\\s+)?[^*\\s]+\\*;(\\r\\n|\\r|\\n)",
- "$1"
- )
-
- targetExclude("**/build/**")
- }
+ plugins.withType<com.diffplug.gradle.spotless.SpotlessPlugin>().configureEach {
+ configure<com.diffplug.gradle.spotless.SpotlessExtension> {
+ java {
+ // Fix the Google Java Format version to 1.7. Since JDK8 only support Google Java Format
+ // 1.7, which is not compatible with JDK17. We will use a newer version when we upgrade to
+ // JDK17.
+ googleJavaFormat("1.7")
+ removeUnusedImports()
+ trimTrailingWhitespace()
+ replaceRegex(
+ "Remove wildcard imports",
+ "import\\s+[^\\*\\s]+\\*;(\\r\\n|\\r|\\n)",
+ "$1"
+ )
+ replaceRegex(
+ "Remove static wildcard imports",
+ "import\\s+(?:static\\s+)?[^*\\s]+\\*;(\\r\\n|\\r|\\n)",
+ "$1"
+ )
+
+ targetExclude("**/build/**")
+ }
- kotlinGradle {
- target("*.gradle.kts")
- ktlint().editorConfigOverride(mapOf("indent_size" to 2))
+ kotlinGradle {
+ target("*.gradle.kts")
+ ktlint().editorConfigOverride(mapOf("indent_size" to 2))
+ }
}
}
}
@@ -173,6 +174,12 @@ subprojects {
}
}
+ if ((project.name == "catalogs") || project.name == "clients") {
+ tasks.withType<Jar> {
+ enabled = false
+ }
+ }
+
gradle.projectsEvaluated {
tasks.withType<JavaCompile> {
options.compilerArgs.addAll(arrayOf("-Xlint:deprecation", "-Werror"))