diff --git a/CHANGES.md b/CHANGES.md index 6f19b9751d..45fd5181fb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,11 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Added * Support for google-java-format 1.8 (including test infrastructure for Java 11). ([#562](https://github.com/diffplug/spotless/issues/562)) * Improved PaddedCell such that it is as performant as non-padded cell - no reason not to have it always enabled. Deprecated all of `PaddedCellBulk`. ([#561](https://github.com/diffplug/spotless/pull/561)) +### Changed +* Updated a bunch of dependencies, most notably: ([#564](https://github.com/diffplug/spotless/pull/564)) + * jgit `5.5.0.201909110433-r` -> `5.7.0.202003110725-r` + * gradle `6.2.2` -> `6.3` + * spotbugs gradle plugin `2.0.0` -> `4.0.8` ## [1.28.1] - 2020-04-02 ### Fixed diff --git a/build.gradle b/build.gradle index 48c431b337..b9523cbd8c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,16 @@ plugins { // https://github.com/diffplug/goomph/blob/master/CHANGES.md - id 'com.diffplug.eclipse.resourcefilters' version '3.21.0' + id 'com.diffplug.eclipse.resourcefilters' version '3.22.0' // https://plugins.gradle.org/plugin/com.gradle.plugin-publish id 'com.gradle.plugin-publish' version '0.11.0' apply false // https://github.com/bintray/gradle-bintray-plugin/releases - id 'com.jfrog.bintray' version '1.8.4' apply false + id 'com.jfrog.bintray' version '1.8.5' apply false // https://github.com/mnlipp/jdrupes-mdoclet/releases id 'org.jdrupes.mdoclet' version '1.0.9' apply false // https://github.com/spotbugs/spotbugs/releases - id "com.github.spotbugs" version "2.0.0" apply false + id "com.github.spotbugs" version "4.0.8" apply false //https://github.com/diffplug/goomph - id "com.diffplug.p2.asmaven" version "3.21.0" apply false + id "com.diffplug.p2.asmaven" version "3.22.0" apply false // https://github.com/diffplug/spotless-changelog id "com.diffplug.spotless-changelog" version "1.1.0" apply false } @@ -47,5 +47,5 @@ eclipseResourceFilters { } static Class spotBugsTaskType() { - return com.github.spotbugs.SpotBugsTask + return com.github.spotbugs.snom.SpotBugsTask } diff --git a/gradle.properties b/gradle.properties index ea5d528a40..2d4b0cd9bb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,19 +15,19 @@ artifactIdGradle=spotless-plugin-gradle # Build requirements VER_JAVA=1.8 -VER_SPOTBUGS=3.1.6 +VER_SPOTBUGS=4.0.2 # Dependencies provided by Spotless plugin VER_SLF4J=[1.6,2.0[ # Used in multiple places VER_DURIAN=1.2.0 -VER_JUNIT=4.12 -VER_ASSERTJ=3.5.2 -VER_MOCKITO=2.13.0 +VER_JUNIT=4.13 +VER_ASSERTJ=3.15.0 +VER_MOCKITO=3.3.3 # Used for Maven Plugin VER_MAVEN_API=3.0 VER_ECLIPSE_AETHER=1.1.0 -VER_MUSTACHE=0.9.5 +VER_MUSTACHE=0.9.6 VER_PLEXUS_RESOURCES=1.0.1 diff --git a/gradle/java-setup.gradle b/gradle/java-setup.gradle index c3f3c167eb..174b6ecbcb 100644 --- a/gradle/java-setup.gradle +++ b/gradle/java-setup.gradle @@ -34,27 +34,21 @@ eclipseResourceFilters { apply plugin: 'com.github.spotbugs' spotbugs { toolVersion = VER_SPOTBUGS - sourceSets = [ - // don't check the test code - sourceSets.main - ] ignoreFailures = false // bug free or it doesn't ship! reportsDir = file('build/spotbugs') effort = 'max' // min|default|max reportLevel = 'medium' // low|medium|high (low = sensitive to even minor mistakes) omitVisitors = [] // bugs that we want to ignore } -// HTML instead of XML -tasks.withType(spotBugsTaskType()) { +tasks.named('spotbugsTest') { + enabled = false +} +tasks.named('spotbugsMain') { // only run on Java 8 (no benefit to running twice) enabled = org.gradle.api.JavaVersion.current() == org.gradle.api.JavaVersion.VERSION_1_8 - reports { - xml.enabled = false - html.enabled = true - } } dependencies { compileOnly 'net.jcip:jcip-annotations:1.0' - compileOnly 'com.github.spotbugs:spotbugs-annotations:3.1.6' + compileOnly "com.github.spotbugs:spotbugs-annotations:${VER_SPOTBUGS}" compileOnly 'com.google.code.findbugs:jsr305:3.0.2' } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index cc4fdc293d..f3d88b1c2f 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 a2bf1313b8..a4b4429748 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-6.2.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew.bat b/gradlew.bat index 9618d8d960..62bd9b9cce 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @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="-Xmx64m" "-Xms64m" diff --git a/lib-extra/build.gradle b/lib-extra/build.gradle index dde49be52b..89ad286633 100644 --- a/lib-extra/build.gradle +++ b/lib-extra/build.gradle @@ -12,10 +12,10 @@ dependencies { implementation "com.diffplug.durian:durian-core:${VER_DURIAN}" implementation "com.diffplug.durian:durian-collect:${VER_DURIAN}" // needed by GitAttributesLineEndings - implementation "org.eclipse.jgit:org.eclipse.jgit:5.5.0.201909110433-r" + implementation "org.eclipse.jgit:org.eclipse.jgit:5.7.0.202003110725-r" implementation "com.googlecode.concurrent-trees:concurrent-trees:2.6.1" // used for xml parsing in EclipseFormatter - implementation "org.codehaus.groovy:groovy-xml:2.4.7" + implementation "org.codehaus.groovy:groovy-xml:3.0.3" // testing testImplementation project(':testlib') diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index dc1562e180..fb97df88e3 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -3,12 +3,13 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`). ## [Unreleased] +### Added +* Support for google-java-format 1.8 (requires you to run build on Java 11) ([#562](https://github.com/diffplug/spotless/issues/562)) ### Changed * PaddedCell is now always enabled. It is strictly better than non-padded cell, and there is no performance penalty. [See here](https://github.com/diffplug/spotless/pull/560#issuecomment-621752798) for detailed explanation. ([#561](https://github.com/diffplug/spotless/pull/561)) +* Updated a bunch of dependencies, most notably jgit `5.5.0.201909110433-r` -> `5.7.0.202003110725-r`. ([#564](https://github.com/diffplug/spotless/pull/564)) ## [3.28.1] - 2020-04-02 -### Added -* Support for google-java-format 1.8 (requires you to run build on Java 11) ([#562](https://github.com/diffplug/spotless/issues/562)) ### Fixed * Eclipse-WTP formatter (web tools platform, not java) handles some character encodings incorrectly on OS with non-unicode default file encoding [#545](https://github.com/diffplug/spotless/issues/545). Fixed for Eclipse-WTP formatter Eclipse version 4.13.0 (default version). diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index cc2fcd2b0c..525136a288 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -3,11 +3,13 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Added +* Support for google-java-format 1.8 (requires you to run build on Java 11) ([#562](https://github.com/diffplug/spotless/issues/562)) +* Updated a bunch of dependencies, most notably jgit `5.5.0.201909110433-r` -> `5.7.0.202003110725-r`. ([#564](https://github.com/diffplug/spotless/pull/564)) ## [1.30.0] - 2020-04-10 ### Added * Support for prettier ([#555](https://github.com/diffplug/spotless/pull/555)). -* Support for google-java-format 1.8 (requires you to run build on Java 11) ([#562](https://github.com/diffplug/spotless/issues/562)) ## [1.29.0] - 2020-04-02 ### Added diff --git a/testlib/src/test/java/com/diffplug/spotless/npm/TsFmtFormatterStepTest.java b/testlib/src/test/java/com/diffplug/spotless/npm/TsFmtFormatterStepTest.java index 4a7b0efbb3..41858d2faa 100644 --- a/testlib/src/test/java/com/diffplug/spotless/npm/TsFmtFormatterStepTest.java +++ b/testlib/src/test/java/com/diffplug/spotless/npm/TsFmtFormatterStepTest.java @@ -57,7 +57,9 @@ public void formattingUsingConfigFile() throws Exception { final String cleanFile = filedir + configFileNameWithoutExtension + ".clean"; // some config options expect to see at least one file in the baseDir, so let's write one there - Files.write(new File(configFile.getParentFile(), configFileNameWithoutExtension + ".ts").toPath(), getTestResource(dirtyFile).getBytes(StandardCharsets.UTF_8)); + File srcDir = new File(rootFolder(), "src/main/typescript"); + Files.createDirectories(srcDir.toPath()); + Files.write(new File(srcDir, configFileNameWithoutExtension + ".ts").toPath(), getTestResource(dirtyFile).getBytes(StandardCharsets.UTF_8)); final FormatterStep formatterStep = TsFmtFormatterStep.create( TsFmtFormatterStep.defaultDevDependencies(),