Skip to content

Commit

Permalink
Adding spotless support for the whole repo
Browse files Browse the repository at this point in the history
Signed-off-by: TrungBui59 <[email protected]>
  • Loading branch information
TrungBui59 committed Nov 22, 2023
1 parent 9f438d3 commit 6325f62
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 52 deletions.
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ buildscript {
}

plugins {
id 'base'
id 'com.netflix.nebula.ospackage' version "11.1.0"
id 'java'
id "io.freefair.lombok" version "8.0.1"
id 'jacoco'
id 'com.diffplug.spotless' version '6.18.0' apply false
}

apply plugin: "com.dorongold.task-tree"
Expand All @@ -63,9 +65,18 @@ allprojects {
}

subprojects {
apply plugin: 'com.diffplug.spotless'
configurations {
testImplementation.extendsFrom compileOnly
}
spotless {
java {
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'

eclipse().configFile rootProject.file('.eclipseformat.xml')
}
}
}

ext {
Expand Down
10 changes: 0 additions & 10 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ plugins {
id 'jacoco'
id 'com.github.johnrengelman.shadow'
id 'maven-publish'
id 'com.diffplug.spotless' version '6.18.0'
id 'signing'
}

Expand All @@ -21,15 +20,6 @@ dependencies {

}

spotless {
java {
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'

eclipse().configFile rootProject.file('.eclipseformat.xml')
}
}

jacocoTestReport {
reports {
xml.getRequired().set(true)
Expand Down
12 changes: 1 addition & 11 deletions memory/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ plugins {
id 'java'
id 'jacoco'
id "io.freefair.lombok"
id 'com.diffplug.spotless' version '6.18.0'
}

dependencies {
Expand Down Expand Up @@ -70,13 +69,4 @@ jacocoTestCoverageVerification {
}
dependsOn jacocoTestReport
}
check.dependsOn jacocoTestCoverageVerification

spotless {
java {
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'

eclipse().configFile rootProject.file('.eclipseformat.xml')
}
}
check.dependsOn jacocoTestCoverageVerification
12 changes: 1 addition & 11 deletions ml-algorithms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ plugins {
id 'java'
id 'jacoco'
id "io.freefair.lombok"
id 'com.diffplug.spotless' version '6.18.0'
}

repositories {
Expand Down Expand Up @@ -99,13 +98,4 @@ jacocoTestCoverageVerification {
}
dependsOn jacocoTestReport
}
check.dependsOn jacocoTestCoverageVerification

spotless {
java {
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'

eclipse().configFile rootProject.file('.eclipseformat.xml')
}
}
check.dependsOn jacocoTestCoverageVerification
10 changes: 0 additions & 10 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ plugins {
id "io.freefair.lombok"
id 'jacoco'
id 'java-library'
id 'com.diffplug.spotless' version '6.18.0'
id 'checkstyle'
}

Expand Down Expand Up @@ -386,15 +385,6 @@ afterEvaluate {
}
}

spotless {
java {
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'

eclipse().configFile rootProject.file('.eclipseformat.xml')
}
}

tasks.withType(licenseHeaders.class) {
additionalLicense 'AL ', 'Apache', 'Licensed under the Apache License, Version 2.0 (the "License")'
}
Expand Down
10 changes: 0 additions & 10 deletions search-processors/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
id 'java'
id 'jacoco'
id "io.freefair.lombok"
id 'com.diffplug.spotless' version '6.18.0'
}

repositories {
Expand Down Expand Up @@ -74,12 +73,3 @@ jacocoTestCoverageVerification {
}

check.dependsOn jacocoTestCoverageVerification

spotless {
java {
removeUnusedImports()
importOrder 'java', 'javax', 'org', 'com'

eclipse().configFile rootProject.file('.eclipseformat.xml')
}
}

0 comments on commit 6325f62

Please sign in to comment.