mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Gradle 3.2.1 (#369)
Updated to gradle 3.2.1. This also moves all of the task graph listeners for dependency setup to use the gradle model, making it both safer and reducing line count.
This commit is contained in:
committed by
Peter Johnson
parent
bfe429de51
commit
14b56db99e
@@ -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'
|
||||
}
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -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
|
||||
|
||||
19
gradlew
vendored
19
gradlew
vendored
@@ -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" "$@"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user