diff --git a/cmake/rosjava.cmake.em b/cmake/rosjava.cmake.em index 7d44e7dfe5e24a962e3bcd047cb14195d06b0c04..8c849b266822e895c555d8b3734f8952bf654ff1 100644 --- a/cmake/rosjava.cmake.em +++ b/cmake/rosjava.cmake.em @@ -67,7 +67,7 @@ endmacro() # RosJava Package ############################################################################## # Calls the gradle wrapper to compile just the package -# that it is called in with install and installApp targets. +# that it is called in with install and installDist targets. macro(catkin_rosjava_setup) catkin_rosjava_env_setup() find_gradle() diff --git a/gradle/Readme.md b/gradle/Readme.md index 0c5781dcae89b3efcdd015a9d18d972497cdfc74..57f0f4ea4dc27550be561df30b19117225776e2e 100644 --- a/gradle/Readme.md +++ b/gradle/Readme.md @@ -1,4 +1,4 @@ -It is currently the gradle wrapper supporting gradle 4.6 +It is currently the gradle wrapper supporting gradle 5.6.2 When creating the tarball, simply run the following command in any gradle projects root. diff --git a/gradle/gradle/wrapper/gradle-wrapper.jar b/gradle/gradle/wrapper/gradle-wrapper.jar index 3baa851b28c65f87dd36a6748e1a85cf360c1301..5c2d1cf016b3885f6930543d57b744ea8c220a1a 100644 Binary files a/gradle/gradle/wrapper/gradle-wrapper.jar and b/gradle/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/gradle/wrapper/gradle-wrapper.properties b/gradle/gradle/wrapper/gradle-wrapper.properties index 50d293e54175349954b7266e128bfdd5b9070f62..7c4388a92162482ab4a8c4f73540e01782628703 100644 --- a/gradle/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Mar 14 09:34:19 CET 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip diff --git a/gradle/gradlew b/gradle/gradlew index 27309d92314c57d6e442529f1362bafc8376feae..83f2acfdc319a24e8766cca78f32474ad7a22dd6 100755 --- a/gradle/gradlew +++ b/gradle/gradlew @@ -1,4 +1,20 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## ## @@ -28,16 +44,16 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -109,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` @@ -154,11 +170,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 "$@") -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# 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 + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/package.xml b/package.xml index 13a495ce652a52fc7da8e2f252f46cb49ea42418..def002a5f2c46c2cea3e7a974b30657069876138 100644 --- a/package.xml +++ b/package.xml @@ -1,6 +1,6 @@ <package> <name>rosjava_build_tools</name> - <version>0.4.0</version> + <version>0.4.1</version> <description> Simple tools and catkin modules for rosjava development. </description> diff --git a/src/rosjava_build_tools/create_rosjava_project.py b/src/rosjava_build_tools/create_rosjava_project.py index 2c0ec19548039baf065650e409ecbc444dff5555..7afe7c5c9815e6ab15a0c557fa61aa68a1707124 100644 --- a/src/rosjava_build_tools/create_rosjava_project.py +++ b/src/rosjava_build_tools/create_rosjava_project.py @@ -236,7 +236,7 @@ def create_rosjava_project(): author = args.author create_rosjava_project_common(args, 'rosjava_project') create_talker_listener_classes(project_name, 'rosjava_project', author) - add_tasks_to_cmake_setup(['installApp', 'publish']) + add_tasks_to_cmake_setup(['installDist', 'publish']) def create_rosjava_library_project(): diff --git a/src/rosjava_build_tools/templates/rosjava_package/CMakeLists.txt.in b/src/rosjava_build_tools/templates/rosjava_package/CMakeLists.txt.in index 78952fc9aadeb488a0543b6bfc3cdd87811d8682..bef17fdc0c5571d38403141914b4a067fd941558 100644 --- a/src/rosjava_build_tools/templates/rosjava_package/CMakeLists.txt.in +++ b/src/rosjava_build_tools/templates/rosjava_package/CMakeLists.txt.in @@ -12,7 +12,7 @@ project(%(repo_name)s) find_package(catkin REQUIRED rosjava_build_tools) # Set the gradle targets you want catkin's make to run by default, e.g. -# catkin_rosjava_setup(installApp) +# catkin_rosjava_setup(installDist) # Note that the catkin_create_rosjava_xxx scripts will usually automatically # add tasks to this for you when you create subprojects. catkin_rosjava_setup() diff --git a/src/rosjava_build_tools/templates/rosjava_package/build.gradle.in b/src/rosjava_build_tools/templates/rosjava_package/build.gradle.in index f8269b755874bb32b62ae8a6a885cc6aac0540b3..9521af89619a7c5f8db94e82d0dfdf4f346cfc54 100644 --- a/src/rosjava_build_tools/templates/rosjava_package/build.gradle.in +++ b/src/rosjava_build_tools/templates/rosjava_package/build.gradle.in @@ -59,9 +59,9 @@ subprojects { install: deploys jar's to MavenLocal() (i.e. ~/.m2/repository) publish : deploys jar's to devel/share/maven - installApp : assembles java apps in the _subproject_/build directories. + installDist : assembles java apps in the _subproject_/build directories. - Note that these are dependent on the type of project (e.g. installApp is only valid for + Note that these are dependent on the type of project (e.g. installDist is only valid for java binary subprojects, while publish is only added once a subproject is included. If you're using catkin_make, this is not important, since it will use the task list specified in CMakeLists.txt diff --git a/src/rosjava_build_tools/templates/rosjava_project/build.gradle.in b/src/rosjava_build_tools/templates/rosjava_project/build.gradle.in index 6fbec4f1d7e0f5cf4f6efaa3ae0c7466c10a5d8e..c022fcf6386f294cf6c85debeb0ef60401456830 100644 --- a/src/rosjava_build_tools/templates/rosjava_project/build.gradle.in +++ b/src/rosjava_build_tools/templates/rosjava_project/build.gradle.in @@ -14,7 +14,7 @@ * the License. */ -/* This plugin is necessary for creating installApp tasks (i.e. executables) */ +/* This plugin is necessary for creating installDist tasks (i.e. executables) */ apply plugin: 'application' mainClassName = 'org.ros.RosRun'