diff --git a/build.gradle b/build.gradle index e5e5db2380..ac2c7e061b 100644 --- a/build.gradle +++ b/build.gradle @@ -62,5 +62,5 @@ apply from: 'cppSettings.gradle' apply from: 'ni-libraries/ni-libraries.gradle' task wrapper(type: Wrapper) { - gradleVersion = '3.0' + gradleVersion = '3.2.1' } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index deedc7fa5e..51288f9c2f 100644 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 c16481e0b7..de7cd3de45 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Aug 22 20:26:07 PDT 2016 +#Thu Nov 24 12:34:01 EST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip diff --git a/gradlew b/gradlew index 9aa616c273..4453ccea33 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -154,16 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save ( ) { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" # 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 +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then cd "$(dirname "$0")" fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/hal/build.gradle b/hal/build.gradle index 19e46ff589..dbe93510ec 100644 --- a/hal/build.gradle +++ b/hal/build.gradle @@ -33,26 +33,10 @@ model { } } } - -// HALSim(NativeLibrarySpec) { -// binaries.all { -// if (toolChain in Gcc){ -// cppCompiler.args "-std=c++1y" -// } -// } -// -// sources { -// cpp { -// source { -// srcDirs = ["lib/sim", "lib/shared"] -// includes = ["**/*.cpp"] -// } -// exportedHeaders { -// srcDirs = ["include", "lib/sim", "lib/shared"] -// } -// } -// } -// } + } + tasks { tasks -> + tasks.halZip.dependsOn tasks.HALAthenaSharedLibrary + tasks.athenaRuntimeZip.dependsOn tasks.HALAthenaSharedLibrary } } @@ -96,13 +80,6 @@ task halZip(type: Zip) { exclude 'genlinks.bat' exclude 'libwpi.so' } - - // Add the hal static and shared libraries as a dependency - project(':hal').tasks.whenTaskAdded { task -> - if (task.name.toLowerCase() == 'halathenastaticlibrary' || task.name.toLowerCase() == 'halathenasharedlibrary') { - halZip.dependsOn task - } - } } task athenaRuntimeZip(type: Zip) { @@ -155,13 +132,6 @@ task athenaRuntimeZip(type: Zip) { from (file(wpiUtilSharedLibDebug)) { into 'lib' } - - // Add the hal static and shared libraries as a dependency - project(':hal').tasks.whenTaskAdded { task -> - if (task.name.toLowerCase() == 'halathenastaticlibrary' || task.name.toLowerCase() == 'halathenasharedlibrary') { - athenaRuntimeZip.dependsOn task - } - } } diff --git a/wpilibc/athena.gradle b/wpilibc/athena.gradle index c0269ec637..78df122a3d 100644 --- a/wpilibc/athena.gradle +++ b/wpilibc/athena.gradle @@ -12,6 +12,7 @@ model { targetPlatform 'arm' binaries.all { tasks.withType(CppCompile) { + dependsOn generateCppVersion cppCompiler.args "-DNAMESPACED_WPILIB" addNiLibraryLinks(linker, targetPlatform) addNetworkTablesLibraryLinks(it, linker, targetPlatform) @@ -33,6 +34,9 @@ model { } } } + tasks { tasks -> + tasks.wpilibcZip.dependsOn tasks.wpilibcSharedLibrary + } } task wpilibcZip(type: Zip) { @@ -71,29 +75,6 @@ task wpilibcZip(type: Zip) { } } -// Add the dependency on the wpilib_nonsharedStaticLibrary task to the wpilibc task. Because of the gradle lifecycle, -// this cannot be done purely with dependsOn in the task, as the static library task doesn't exist yet. Same goes for -// the networkTablesStaticLibrary task and the two HAL tasks below -tasks.whenTaskAdded { task -> - if (task.name.toLowerCase() == 'wpilibcsharedlibrary') { - wpilibcZip.dependsOn task - } -} - -// Add the hal static and shared libraries as a dependency -project(':hal').tasks.whenTaskAdded { task -> - if (task.name.toLowerCase() == 'halathenastaticlibrary' || task.name.toLowerCase() == 'halathenasharedlibrary') { - wpilibcZip.dependsOn task - } -} - -// Add the generate version file task as a dependency -tasks.whenTaskAdded { task -> - if (task.name.toLowerCase().startsWith('compilewpilib')) { - task.dependsOn generateCppVersion - } -} - if (checkDoxygen()) { def ntSourcesDependency = project.dependencies.create('edu.wpi.first.wpilib.networktables.cpp:NetworkTables:+:sources@zip') diff --git a/wpilibj/athena.gradle b/wpilibj/athena.gradle index 488c41de8a..4510e042d2 100644 --- a/wpilibj/athena.gradle +++ b/wpilibj/athena.gradle @@ -58,6 +58,9 @@ model { } } } + tasks { + it.wpilibjNativeLibraries.dependsOn it.wpilibJavaJNISharedLibrary + } } // Maven publishing configuration @@ -95,13 +98,6 @@ jar { from sourceSets.shared.output } -tasks.whenTaskAdded { task -> - if (task.name == 'wpilibJavaJNISharedLibrary') { - jar.dependsOn task - wpilibjNativeLibraries.dependsOn task - } -} - task wpilibjSources(type: Jar, dependsOn: classes) { description = 'Creates the sources jar for the maven publishing routine' group = 'WPILib'