Skip to content

Commit

Permalink
Update Gradle to v3.0 (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinShalit authored and JLLeitschuh committed Aug 25, 2016
1 parent bbea07c commit a700892
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ before_install:

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

script:
- ./gradlew check jacocoTestReport jacocoRootReport --stacktrace -Pheadless=true -PlogTests
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ install:
- choco install -y InnoSetup

build_script:
- gradlew.bat :ui:jfxNative --stacktrace
- gradlew.bat jfxNative --no-daemon --stacktrace

# to run your custom scripts instead of automatic tests
test_script:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -464,5 +464,5 @@ task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
}

task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
gradleVersion = '3.0'
}
2 changes: 1 addition & 1 deletion core/src/test/java/edu/wpi/grip/core/http/NoLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* Jetty logger implementation that ignores all logging calls.
*/
@SuppressWarnings("PMD.UncommentedEmptyMethod")
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
public class NoLogger implements Logger {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ public MockROSMessagePublisher(C converter) {
}

@Override
@SuppressWarnings("PMD.UncommentedEmptyMethod")
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
public void publish(ROSMessagePublisher.Converter publish) {

}

@Override
@SuppressWarnings("PMD.UncommentedEmptyMethod")
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
protected void publishNameChanged(Optional<String> oldName, String newName) {

}

@Override
@SuppressWarnings("PMD.UncommentedEmptyMethod")
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
public void close() {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.Optional;
import java.util.Set;

@SuppressWarnings("PMD.UncommentedEmptyMethod")
@SuppressWarnings("PMD.UncommentedEmptyMethodBody")
public class MockMapNetworkPublisher<T> extends MapNetworkPublisher<T> implements
MapNetworkPublisherFactory {

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jul 24 01:01:23 PDT 2016
#Mon Aug 22 07:45:14 EDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
5 changes: 5 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,9 @@ function splitJvmOpts() {
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

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

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

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
4 changes: 1 addition & 3 deletions pmd-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<rule ref="rulesets/java/basic.xml">
<exclude name="UselessParentheses" />
</rule>
<rule ref="rulesets/java/basic.xml" />
<rule ref="rulesets/java/braces.xml" />
<rule ref="rulesets/java/design.xml">
<exclude name="AccessorClassGeneration" />
Expand Down
3 changes: 2 additions & 1 deletion ui/src/main/java/edu/wpi/grip/ui/util/ControllerMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,13 @@ public C getWithNode(N node) {
* @param controller The controller to use as a lookup key for the move
* @param distance The distance to move the node. 0 means no movement.
*/
@SuppressWarnings("PMD.CompareObjectsWithEquals")
public void moveByDistance(C controller, int distance) {
checkNotNull(controller, "Controller can not be null");
final N node = checkNotNull(controllerNodeMap.get(controller));
if (distance == 0) {
return;
}
final N node = checkNotNull(controllerNodeMap.get(controller));
final int oldIndex = nodesList.indexOf(node);
final int newIndex = Math.min(Math.max(oldIndex + distance, 0), nodesList.size() - 1);
if (oldIndex != newIndex) {
Expand Down

0 comments on commit a700892

Please sign in to comment.