Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #35 from jubeira/gradle-3-5-1
Browse files Browse the repository at this point in the history
Gradle upgrade: 3.5.1
  • Loading branch information
Juan Ignacio Ubeira authored Apr 25, 2018
2 parents d04dfde + f79ed57 commit 5b5afb4
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cmake/rosjava.cmake.em
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 5 additions & 0 deletions src/rosjava_build_tools/create_android_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import argparse
import subprocess
import shutil
import exceptions

# local imports
import utils
Expand Down Expand Up @@ -71,6 +72,10 @@ def actually_create_android_project(package_name, target_version, java_package_n
except subprocess.CalledProcessError:
print("Error")
raise subprocess.CalledProcessError("failed to create android project.")
except exceptions.OSError as e:
print("OS error" + str(e))
raise exceptions.OSError()

# This is in the old form, let's shovel the shit around to the new form
utils.mkdir_p(os.path.join(path, 'src', 'main', 'java'))
os.remove(os.path.join(path, 'local.properties'))
Expand Down
6 changes: 3 additions & 3 deletions src/rosjava_build_tools/create_rosjava_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ def add_tasks_to_cmake_setup(tasks):
gradle_tasks = set([])
if rosjava_setup_string.find("publish") == -1:
gradle_tasks.add("publish")
if rosjava_setup_string.find("installApp") == -1:
gradle_tasks.add("installApp")
if rosjava_setup_string.find("installDist") == -1:
gradle_tasks.add("installDist")
gradle_tasks |= set(tasks)
console.pretty_print(' File : ', console.cyan)
console.pretty_println('CMakeLists.txt (gradle task update)', console.yellow)
Expand Down Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion src/rosjava_build_tools/gradle/Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This is not installed, but it gets used to generate the gradle wrapper for a project.

It is currently the gradle wrapper supporting gradle 2.14.1
It is currently the gradle wrapper supporting gradle 3.5.1
Binary file modified src/rosjava_build_tools/gradle/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Feb 11 20:39:17 KST 2015
#Fri Jan 26 13:47:21 ART 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
gradleVersion = '3.5.1'
}

buildscript {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
gradleVersion = '3.5.1'
}

buildscript {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 5b5afb4

Please sign in to comment.