Skip to content

Commit a700892

Browse files
AustinShalitJLLeitschuh
authored andcommitted
Update Gradle to v3.0 (#666)
1 parent bbea07c commit a700892

File tree

12 files changed

+18
-20
lines changed

12 files changed

+18
-20
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ before_install:
2727

2828
# Only do an assemble when we aren't building a pull request
2929
install:
30-
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && ./gradlew :ui:jfxNative --stacktrace || ./gradlew --stacktrace '
30+
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && ./gradlew jfxNative --no-daemon --stacktrace || ./gradlew --stacktrace '
3131

3232
script:
3333
- ./gradlew check jacocoTestReport jacocoRootReport --stacktrace -Pheadless=true -PlogTests

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ install:
22
- choco install -y InnoSetup
33

44
build_script:
5-
- gradlew.bat :ui:jfxNative --stacktrace
5+
- gradlew.bat jfxNative --no-daemon --stacktrace
66

77
# to run your custom scripts instead of automatic tests
88
test_script:

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,5 +464,5 @@ task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
464464
}
465465

466466
task wrapper(type: Wrapper) {
467-
gradleVersion = '2.14.1'
467+
gradleVersion = '3.0'
468468
}

core/src/test/java/edu/wpi/grip/core/http/NoLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Jetty logger implementation that ignores all logging calls.
77
*/
8-
@SuppressWarnings("PMD.UncommentedEmptyMethod")
8+
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
99
public class NoLogger implements Logger {
1010

1111
@Override

core/src/test/java/edu/wpi/grip/core/operations/OperationsFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ public MockROSMessagePublisher(C converter) {
5151
}
5252

5353
@Override
54-
@SuppressWarnings("PMD.UncommentedEmptyMethod")
54+
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
5555
public void publish(ROSMessagePublisher.Converter publish) {
5656

5757
}
5858

5959
@Override
60-
@SuppressWarnings("PMD.UncommentedEmptyMethod")
60+
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
6161
protected void publishNameChanged(Optional<String> oldName, String newName) {
6262

6363
}
6464

6565
@Override
66-
@SuppressWarnings("PMD.UncommentedEmptyMethod")
66+
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
6767
public void close() {
6868

6969
}

core/src/test/java/edu/wpi/grip/core/operations/network/MockMapNetworkPublisher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.util.Optional;
66
import java.util.Set;
77

8-
@SuppressWarnings("PMD.UncommentedEmptyMethod")
8+
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
99
public class MockMapNetworkPublisher<T> extends MapNetworkPublisher<T> implements
1010
MapNetworkPublisherFactory {
1111

gradle/wrapper/gradle-wrapper.jar

-501 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Jul 24 01:01:23 PDT 2016
1+
#Mon Aug 22 07:45:14 EDT 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip

gradlew

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,9 @@ function splitJvmOpts() {
161161
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162162
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163163

164+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
165+
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
166+
cd "$(dirname "$0")"
167+
fi
168+
164169
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

gradlew.bat

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ goto fail
4949
@rem Get command-line arguments, handling Windows variants
5050

5151
if not "%OS%" == "Windows_NT" goto win9xME_args
52-
if "%@eval[2+2]" == "4" goto 4NT_args
5352

5453
:win9xME_args
5554
@rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
6059
if "x%~1" == "x" goto execute
6160

6261
set CMD_LINE_ARGS=%*
63-
goto execute
64-
65-
:4NT_args
66-
@rem Get arguments from the 4NT Shell from JP Software
67-
set CMD_LINE_ARGS=%$
6862

6963
:execute
7064
@rem Setup the command line

pmd-ruleset.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
6-
<rule ref="rulesets/java/basic.xml">
7-
<exclude name="UselessParentheses" />
8-
</rule>
6+
<rule ref="rulesets/java/basic.xml" />
97
<rule ref="rulesets/java/braces.xml" />
108
<rule ref="rulesets/java/design.xml">
119
<exclude name="AccessorClassGeneration" />

ui/src/main/java/edu/wpi/grip/ui/util/ControllerMap.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,13 @@ public C getWithNode(N node) {
160160
* @param controller The controller to use as a lookup key for the move
161161
* @param distance The distance to move the node. 0 means no movement.
162162
*/
163+
@SuppressWarnings("PMD.CompareObjectsWithEquals")
163164
public void moveByDistance(C controller, int distance) {
164165
checkNotNull(controller, "Controller can not be null");
165-
final N node = checkNotNull(controllerNodeMap.get(controller));
166166
if (distance == 0) {
167167
return;
168168
}
169+
final N node = checkNotNull(controllerNodeMap.get(controller));
169170
final int oldIndex = nodesList.indexOf(node);
170171
final int newIndex = Math.min(Math.max(oldIndex + distance, 0), nodesList.size() - 1);
171172
if (oldIndex != newIndex) {

0 commit comments

Comments
 (0)