diff --git a/.travis.yml b/.travis.yml index c1f5cbf3d1..17b6e60c75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,13 +8,14 @@ before_install: install: true script: - ./.ci/ci.sh +# lines commented out below are a temporary workaround for https://github.com/diffplug/spotless/issues/429 before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ +# - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock +# - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ - rm -fr plugin-maven/build/localMavenRepository/com/diffplug/spotless/ cache: directories: - - $HOME/.gradle/caches/ - - $HOME/.gradle/wrapper/ +# - $HOME/.gradle/caches/ +# - $HOME/.gradle/wrapper/ - $HOME/.m2/ - plugin-maven/build/localMavenRepository/ diff --git a/build.gradle b/build.gradle index 8b4e78dd77..6c5eef0aed 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,3 @@ -buildscript { - repositories { - maven { - url 'https://plugins.gradle.org/m2/' - } - } - dependencies { - classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:${VER_SPOTBUGS_PLUGIN}" - classpath "com.google.guava:guava:27.1-jre" // Force newer version for spotbugs - } -} - plugins { // dependencyUpdates https://github.com/ben-manes/gradle-versions-plugin/releases id 'com.github.ben-manes.versions' version '0.22.0' @@ -25,6 +13,8 @@ plugins { id 'org.jdrupes.mdoclet' version '1.0.5' apply false // https://github.com/ajoberstar/gradle-git-publish/releases id 'org.ajoberstar.git-publish' version '2.1.1' apply false + // https://github.com/spotbugs/spotbugs/releases + id "com.github.spotbugs" version "2.0.0" apply false } buildScan { @@ -44,3 +34,7 @@ eclipseResourceFilters { exclude().folders().name('plugin-maven') exclude().folders().name('testlib') } + +static Class spotBugsTaskType() { + return com.github.spotbugs.SpotBugsTask +} diff --git a/gradle.properties b/gradle.properties index f1081feec9..1cbb63ede7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,7 +22,6 @@ artifactIdGradle=spotless-plugin-gradle # Build requirements VER_JAVA=1.8 VER_SPOTBUGS=3.1.6 -VER_SPOTBUGS_PLUGIN=2.0.0 # Used in multiple places VER_DURIAN=1.2.0 diff --git a/gradle/java-setup.gradle b/gradle/java-setup.gradle index 31c729168b..0d55295a9e 100644 --- a/gradle/java-setup.gradle +++ b/gradle/java-setup.gradle @@ -1,12 +1,3 @@ -buildscript { - repositories { - maven { - url 'https://plugins.gradle.org/m2/' - } - } - dependencies { classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:${VER_SPOTBUGS_PLUGIN}" } -} - ////////// // JAVA // ////////// @@ -54,7 +45,7 @@ spotbugs { omitVisitors = [] // bugs that we want to ignore } // HTML instead of XML -tasks.withType(com.github.spotbugs.SpotBugsTask) { +tasks.withType(spotBugsTaskType()) { reports { xml.enabled = false html.enabled = true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f6b961fd5a..5c2d1cf016 100755 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 430dfabc5c..8d58bda447 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index cccdd3d517..83f2acfdc3 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -109,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` diff --git a/gradlew.bat b/gradlew.bat index f9553162f1..9618d8d960 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome