diff --git a/build.gradle b/build.gradle index 1fcc58f2..0404859f 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { plugins { id 'base' id 'io.spring.dependency-management' version '1.1.4' - id "io.spring.javaformat" version "${javaFormatVersion}" apply false + id 'io.spring.javaformat' version "${javaFormatVersion}" id 'com.github.spotbugs' version '6.0.4' id 'com.google.protobuf' version '0.9.4' apply false } @@ -66,8 +66,9 @@ configure(javaProjects) { subproject -> apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'idea' + apply plugin: 'checkstyle' + apply plugin: 'io.spring.javaformat' apply from: "${rootDir}/publish-maven.gradle" - apply from: "${rootDir}/gradle/checkstyle-conventions.gradle" sourceSets { test { @@ -138,6 +139,22 @@ configure(javaProjects) { subproject -> [compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all,-options,-processing', '-parameters'] + checkstyle { + toolVersion = '10.3' + configDirectory = rootProject.file('etc/checkstyle') + ignoreFailures = true + } + + dependencies { + // NOTE: We explicitly specify checkstyle dep before javaformat checkstyle due to antlr class mismatch + checkstyle("com.puppycrawl.tools:checkstyle:${checkstyle.toolVersion}") + checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}") + } + + tasks.named('checkFormatMain') { + exclude 'org/springframework/cloud/fn/object/detection/protos' + } + test { maxHeapSize = '2g' jvmArgs '-XX:+HeapDumpOnOutOfMemoryError' diff --git a/etc/checkstyle/checkstyle-header.txt b/etc/checkstyle/checkstyle-header.txt deleted file mode 100644 index 7cd20a67..00000000 --- a/etc/checkstyle/checkstyle-header.txt +++ /dev/null @@ -1,17 +0,0 @@ -^\Q/*\E$ -^\Q * Copyright \E20\d\d(\-20\d\d)?\Q the original author or authors.\E$ -^\Q *\E$ -^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$ -^\Q * you may not use this file except in compliance with the License.\E$ -^\Q * You may obtain a copy of the License at\E$ -^\Q *\E$ -^\Q * https://www.apache.org/licenses/LICENSE-2.0\E$ -^\Q *\E$ -^\Q * Unless required by applicable law or agreed to in writing, software\E$ -^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$ -^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$ -^\Q * See the License for the specific language governing permissions and\E$ -^\Q * limitations under the License.\E$ -^\Q */\E$ -^$ -^.*$ diff --git a/etc/checkstyle/checkstyle-suppressions.xml b/etc/checkstyle/checkstyle-suppressions.xml index 6b14b36a..3f5fa8b6 100644 --- a/etc/checkstyle/checkstyle-suppressions.xml +++ b/etc/checkstyle/checkstyle-suppressions.xml @@ -4,6 +4,6 @@ "https://checkstyle.org/dtds/suppressions_1_2.dtd"> - + diff --git a/etc/checkstyle/checkstyle.xml b/etc/checkstyle/checkstyle.xml index c4631b60..97f2e1d0 100644 --- a/etc/checkstyle/checkstyle.xml +++ b/etc/checkstyle/checkstyle.xml @@ -7,13 +7,7 @@ - - - - - - diff --git a/gradle/checkstyle-conventions.gradle b/gradle/checkstyle-conventions.gradle deleted file mode 100644 index 24e0701e..00000000 --- a/gradle/checkstyle-conventions.gradle +++ /dev/null @@ -1,19 +0,0 @@ - -apply plugin: 'io.spring.javaformat' -apply plugin: 'checkstyle' - -checkstyle { - toolVersion = "10.3" - configDirectory = rootProject.file('etc/checkstyle') - ignoreFailures = true -} - -dependencies { - // NOTE: We explicitly specify checkstyle dep before javaformat checkstyle due to antlr class mismatch - checkstyle("com.puppycrawl.tools:checkstyle:${checkstyle.toolVersion}") - checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}") -} - -tasks.named("checkFormatMain") { - exclude "org/springframework/cloud/fn/object/detection/protos" -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7f93135c..d64cd491 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 46671acb..db8c3baa 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME