Skip to content

Commit d7ea2f3

Browse files
authored
Merge pull request #433 from ZacSweers/z/gradle56
Update to Gradle 5.6
2 parents 5e07449 + abbcf65 commit d7ea2f3

8 files changed

+49
-32
lines changed

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ before_install:
88
install: true
99
script:
1010
- ./.ci/ci.sh
11+
# lines commented out below are a temporary workaround for https://github.com/diffplug/spotless/issues/429
1112
before_cache:
12-
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
13-
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
13+
# - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
14+
# - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
1415
- rm -fr plugin-maven/build/localMavenRepository/com/diffplug/spotless/
1516
cache:
1617
directories:
17-
- $HOME/.gradle/caches/
18-
- $HOME/.gradle/wrapper/
18+
# - $HOME/.gradle/caches/
19+
# - $HOME/.gradle/wrapper/
1920
- $HOME/.m2/
2021
- plugin-maven/build/localMavenRepository/

build.gradle

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
buildscript {
2-
repositories {
3-
maven {
4-
url 'https://plugins.gradle.org/m2/'
5-
}
6-
}
7-
dependencies {
8-
classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:${VER_SPOTBUGS_PLUGIN}"
9-
classpath "com.google.guava:guava:27.1-jre" // Force newer version for spotbugs
10-
}
11-
}
12-
131
plugins {
142
// dependencyUpdates https://github.com/ben-manes/gradle-versions-plugin/releases
153
id 'com.github.ben-manes.versions' version '0.22.0'
@@ -25,6 +13,8 @@ plugins {
2513
id 'org.jdrupes.mdoclet' version '1.0.5' apply false
2614
// https://github.com/ajoberstar/gradle-git-publish/releases
2715
id 'org.ajoberstar.git-publish' version '2.1.1' apply false
16+
// https://github.com/spotbugs/spotbugs/releases
17+
id "com.github.spotbugs" version "2.0.0" apply false
2818
}
2919

3020
buildScan {
@@ -44,3 +34,7 @@ eclipseResourceFilters {
4434
exclude().folders().name('plugin-maven')
4535
exclude().folders().name('testlib')
4636
}
37+
38+
static Class<?> spotBugsTaskType() {
39+
return com.github.spotbugs.SpotBugsTask
40+
}

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ artifactIdGradle=spotless-plugin-gradle
2222
# Build requirements
2323
VER_JAVA=1.8
2424
VER_SPOTBUGS=3.1.6
25-
VER_SPOTBUGS_PLUGIN=2.0.0
2625

2726
# Used in multiple places
2827
VER_DURIAN=1.2.0

gradle/java-setup.gradle

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
buildscript {
2-
repositories {
3-
maven {
4-
url 'https://plugins.gradle.org/m2/'
5-
}
6-
}
7-
dependencies { classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:${VER_SPOTBUGS_PLUGIN}" }
8-
}
9-
101
//////////
112
// JAVA //
123
//////////
@@ -54,7 +45,7 @@ spotbugs {
5445
omitVisitors = [] // bugs that we want to ignore
5546
}
5647
// HTML instead of XML
57-
tasks.withType(com.github.spotbugs.SpotBugsTask) {
48+
tasks.withType(spotBugsTaskType()) {
5849
reports {
5950
xml.enabled = false
6051
html.enabled = true

gradle/wrapper/gradle-wrapper.jar

1.26 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"
@@ -109,8 +125,8 @@ if $darwin; then
109125
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110126
fi
111127

112-
# For Cygwin, switch paths to Windows format before running java
113-
if $cygwin ; then
128+
# For Cygwin or MSYS, switch paths to Windows format before running java
129+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
114130
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115131
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116132
JAVACMD=`cygpath --unix "$JAVACMD"`

gradlew.bat

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

1632
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1834

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

0 commit comments

Comments
 (0)