Skip to content

Commit

Permalink
remove spotless from gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
postamar committed Dec 1, 2023
1 parent c9b6792 commit 22e1bbd
Showing 1 changed file with 0 additions and 50 deletions.
50 changes: 0 additions & 50 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import com.github.spotbugs.snom.SpotBugsTask

// The buildscript block defines dependencies in order for .gradle file evaluation.
// This is separate from application dependencies.
// See https://stackoverflow.com/questions/17773817/purpose-of-buildscript-block-in-gradle.
buildscript {
dependencies {
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.20.0'
}
}

plugins {
id 'base'
Expand Down Expand Up @@ -107,48 +99,6 @@ rootProject.tasks.named('clean').configure {
dependsOn cleanPythonVenv
}

// format tasks per project
allprojects {

def createFormatTarget = { pattern ->
ArrayList<String> excludes = [
'**/build', // Ignore new build files as well as the ones ignored when running this through airbyte-ci
'.gradle' // Ignore the gradle version that is downloaded in the container
]
// Build the FileTree.
return fileTree(dir: projectDir, include: pattern, exclude: excludes)
}

// Apply spotless formatting.
apply plugin: 'com.diffplug.spotless'
spotless {
def javaTarget = createFormatTarget('**/*.java')
if (!javaTarget.isEmpty()) {
java {
// See also spotless-maven-pom.xml which is used by airbyte-ci, its config should stay in sync with this one.
target javaTarget
importOrder()
eclipse('4.21').configFile(rootProject.file('tools/gradle/codestyle/java-google-style.xml'))
removeUnusedImports()
trimTrailingWhitespace()
}
}
def groovyGradleTarget = createFormatTarget('**/*.gradle')
if (!groovyGradleTarget.isEmpty()) {
groovyGradle {
target groovyGradleTarget
}
}
}

if (rootProject.ext.skipSlowTests) {
// Format checks should be run via airbyte-ci.
tasks.matching { it.name =~ /spotless.*Check/ }.configureEach {
enabled = false
}
}
}


def getCDKTargetVersion() {
def props = new Properties()
Expand Down

0 comments on commit 22e1bbd

Please sign in to comment.