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

Commit 08256a0

Browse files
author
Julian Cerruti
committed
Merge branch 'kinetic' into obsolete/master
Conflicts: CHANGELOG.rst CMakeLists.txt cmake/rosjava.cmake.em env-hooks/15.rosjava.bash.em env-hooks/15.rosjava.sh.em package.xml src/rosjava_build_tools/create_android_project.py src/rosjava_build_tools/gradle/gradle/wrapper/gradle-wrapper.jar src/rosjava_build_tools/gradle/gradle/wrapper/gradle-wrapper.properties src/rosjava_build_tools/release.py src/rosjava_build_tools/templates/android_package/build.gradle.in src/rosjava_build_tools/templates/android_project/build.gradle.in src/rosjava_build_tools/templates/rosjava_msg_project/build.gradle.in src/rosjava_build_tools/templates/rosjava_package/CMakeLists.txt.in src/rosjava_build_tools/templates/rosjava_package/build.gradle.in src/rosjava_build_tools/templates/rosjava_project/build.gradle.in
2 parents acd088d + 662c622 commit 08256a0

31 files changed

+555
-208
lines changed

CHANGELOG.rst

+71
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,83 @@
22
Changelog
33
^^^^^^^^^
44

5+
0.3.0 (2016-12-14)
6+
------------------
7+
* Updates for Kinetic release.
8+
9+
0.2.4 (2015-06-03)
10+
------------------
11+
* bugfix environment hooks for workspaces with spaces.
12+
13+
0.2.3 (2015-03-01)
14+
------------------
15+
* publically expose the rosjava environment setup (for genjava).
16+
* Contributors: Daniel Stonier
17+
18+
0.2.2 (2015-02-25)
19+
------------------
20+
* support for finding broken message packages.
21+
* Contributors: Daniel Stonier
22+
23+
0.2.1 (2015-02-25)
24+
------------------
25+
* upgrade catkin create scripts for indigo
26+
* support modules for genjava
27+
* deprecated create msg package scripts
28+
* minor bugfixes and improvements.
29+
* Contributors: Benjamin Chrétien, Daniel Stonier, Martin Pecka
30+
531
0.2.0 [2013-10-25]
632
==================
733
* official maven style open range dependencies in templates
834
* gradle 1.7->1.8
935
* android build tools 18.1.1
1036

37+
0.1.34 (2014-06-12)
38+
===================
39+
* assist rospack to speedup by ignoring the installed maven directories.
40+
41+
0.1.33 [2014-03-19]
42+
===================
43+
* gradle 1.9->1.11
44+
45+
0.1.32 [2014-02-20]
46+
===================
47+
* bugfix catkin_make on empty catkin_created gradle projects.
48+
49+
0.1.31 [2014-02-03]
50+
===================
51+
* separate app and library catkin_create_rosjava_xxx_project scripts.
52+
* app rosjava project integration with catkin_make (i.e. cmake-gradle targets).
53+
54+
0.1.30 [2013-12-26]
55+
===================
56+
* rosdistro scraping more intelligent : now checks for message_generation dependant packages
57+
* gradle 1.8->1.9 upgrade in templates
58+
59+
0.1.29 [2013-11-08]
60+
===================
61+
* fix single artifact message generation when there is dependencies.
62+
63+
0.1.28 [2013-10-30]
64+
===================
65+
* seed ROS_MAVEN_REPOSITORY when necessary.
66+
67+
0.1.27 [2013-10-30]
68+
===================
69+
* use ROS_MAVEN_REPOSITORY to configure the external repository.
70+
71+
0.1.26 [2013-10-26]
72+
===================
73+
* embedded gradle 1.7->1.8
74+
* templates updated for official maven style open ranged dependencies
75+
76+
0.1.25 [2013-10-26]
77+
===================
78+
79+
* gradle 1.7->1.8
80+
* android tools 17->18.1.1
81+
1182
0.1.24 [2013-10-04]
1283
===================
1384

CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,10 @@ install(
4242
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
4343
)
4444

45+
set(ROS_MAVEN_DEPLOYMENT_REPOSITORY $ENV{ROS_MAVEN_DEPLOYMENT_REPOSITORY})
46+
if(NOT ROS_MAVEN_DEPLOYMENT_REPOSITORY)
47+
set(ROS_MAVEN_DEPLOYMENT_REPOSITORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/maven")
48+
endif()
49+
file(WRITE ${ROS_MAVEN_DEPLOYMENT_REPOSITORY}/rospack_nosubdirs "")
50+
install(FILES ${ROS_MAVEN_DEPLOYMENT_REPOSITORY}/rospack_nosubdirs
51+
DESTINATION ${CATKIN_GLOBAL_SHARE_DESTINATION}/maven)

README.md

+4-49
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,9 @@
1-
# RosJava Tools
1+
See [rosjava_core](https://github.com/rosjava/rosjava_core) readme.
22

3-
Build tools for rosjava and android repositories. Currently includes some cmake macros and python creation
4-
scripts.
3+
## Moving ##
54

5+
This documentation will eventually merge with the rosjava_core and android_core documentation.
66

7-
## RosJava Build Demo
8-
9-
10-
```
11-
> mkdir -p ~/rosjava/src
12-
> cd ~/rosjava/src
13-
> catkin_init_workspace .
14-
> wstool init .
15-
> wstool set rosjava_build_tools --git https://github.com/rosjava/rosjava_build_tools -v hydro-devel
16-
> wstool set rosjava_core --git https://github.com/rosjava/rosjava_core -v hydro-devel
17-
> wstool update
18-
> cd ~/rosjava
19-
> catkin_make
20-
```
21-
22-
The only changes made to the `rosjava_core` repo was to add a `package.xml` with a depends on `rosjava_build_tools` and a
23-
changes to the `CMakeLists.txt` as follows:
24-
25-
```
26-
...
27-
find_package(catkin REQUIRED rosjava_build_tools)
28-
29-
catkin_rosjava_setup()
30-
```
31-
32-
This cmake makro sets up dummy targets in the cmake configuration which call out to gradle in the actual make step.
33-
It also parses the `package.xml` to add target dependencies from each `build_depends` tag (subsequently letting you
34-
sequence builds across repositories).
35-
36-
It also adds a global and package `gradle-clean` target.
37-
38-
```
39-
> catkin_make
40-
# Clean a single gradle package
41-
> cd ~/rosjava/build/rosjava_core
42-
> make gradle-clean-rosjava_core
43-
# Clean all gradle packages
44-
> cd ~/rosjava/build
45-
> make gradle-clean
46-
```
47-
48-
## Android Build Demo
7+
## Usage ##
498

509
Refer to http://ros.org/wiki/rosjava_build_tools.
51-
52-
## Moving
53-
54-
This documentation will eventually merge with the rosjava_core and android_core documentation.

cmake/rosjava.cmake.em

+28-16
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ endmacro()
4343
# CATKIN_ENV won't have any configuration, so we need some incoming here.
4444
# Note that we check for the variable existence as well so we don't
4545
# override a user setting.
46-
macro(_rosjava_env)
46+
macro(catkin_rosjava_env_setup)
47+
set(ROS_GRADLE_VERBOSE $ENV{ROS_GRADLE_VERBOSE})
4748
set(ROS_MAVEN_DEPLOYMENT_REPOSITORY $ENV{ROS_MAVEN_DEPLOYMENT_REPOSITORY})
4849
set(ROS_MAVEN_REPOSITORY $ENV{ROS_MAVEN_REPOSITORY})
4950
if(NOT ROS_MAVEN_DEPLOYMENT_REPOSITORY)
@@ -68,34 +69,49 @@ endmacro()
6869
# Calls the gradle wrapper to compile just the package
6970
# that it is called in with install and installApp targets.
7071
macro(catkin_rosjava_setup)
71-
_rosjava_env()
72+
catkin_rosjava_env_setup()
7273
find_gradle()
7374
if( ${ARGC} EQUAL 0 )
74-
# Note : COMMAND is a list of variables (semi-colon separated)
75-
set(gradle_tasks "uploadArchives") # old targets "install;installApp;uploadArchives"
75+
return() # Nothing to do (typically no subprojects created yet)
7676
else()
7777
set(gradle_tasks ${ARGV})
7878
endif()
79-
add_custom_target(gradle-${PROJECT_NAME}
80-
ALL
81-
COMMAND ${ROSJAVA_ENV} ${CATKIN_ENV} "env" "|" "grep" "ROS"
82-
COMMAND ${ROSJAVA_ENV} ${CATKIN_ENV} ${${PROJECT_NAME}_gradle_BINARY} ${gradle_tasks}
79+
if(ROS_GRADLE_VERBOSE)
80+
set(gradle_options "")
81+
else()
82+
set(gradle_options "-q")
83+
endif()
84+
###################################
85+
# Execution
86+
###################################
87+
add_custom_target(gradle-${PROJECT_NAME} ALL
88+
#COMMAND ${ROSJAVA_ENV} ${CATKIN_ENV} "env" "|" "grep" "ROS"
89+
COMMAND ${ROSJAVA_ENV} ${CATKIN_ENV} ${${PROJECT_NAME}_gradle_BINARY} ${gradle_options} ${gradle_tasks}
8390
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
8491
VERBATIM
92+
COMMENT "Gradling tasks for ${PROJECT_NAME}"
8593
)
94+
###################################
95+
# Target Management
96+
###################################
8697
catkin_package_xml()
87-
foreach(depends in ${${PROJECT_NAME}_BUILD_DEPENDS})
98+
foreach(depends ${${PROJECT_NAME}_BUILD_DEPENDS})
8899
if(TARGET gradle-${depends})
89-
#message(STATUS "Adding dependency gradle-${depends}")
100+
#message(STATUS "Adding dependency.....gradle-${PROJECT_NAME} <- gradle-${depends}")
90101
add_dependencies(gradle-${PROJECT_NAME} gradle-${depends})
91102
endif()
103+
if(TARGET ${depends}_generate_messages)
104+
#message(STATUS "Adding dependency.....gradle-${PROJECT_NAME} <- ${depends}_generate_messages")
105+
add_dependencies(gradle-${PROJECT_NAME} ${depends}_generate_messages)
106+
endif()
92107
endforeach()
93108
if(NOT TARGET gradle-clean)
94109
add_custom_target(gradle-clean)
95110
endif()
96111
add_custom_target(gradle-clean-${PROJECT_NAME}
97112
COMMAND ${CATKIN_ENV} ${${PROJECT_NAME}_gradle_BINARY} clean
98113
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
114+
COMMENT "Cleaning gradle project for ${PROJECT_NAME}"
99115
)
100116
add_dependencies(gradle-clean gradle-clean-${PROJECT_NAME})
101117
endmacro()
@@ -107,14 +123,10 @@ endmacro()
107123
# It checks the build type and determines whether it should run
108124
# assembleDebug or assembleRelease
109125
macro(catkin_android_setup)
110-
_rosjava_env()
126+
catkin_rosjava_env_setup()
111127
find_gradle()
112128
if( ${ARGC} EQUAL 0 )
113-
if(CMAKE_BUILD_TYPE STREQUAL "Release")
114-
set(gradle_tasks "assembleRelase")
115-
else()
116-
set(gradle_tasks "assembleDebug")
117-
endif()
129+
return() # Nothing to do (typically no subprojects created yet)
118130
else()
119131
set(gradle_tasks ${ARGV})
120132
endif()

env-hooks/15.rosjava.bash.em

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ SCRIPT=@(CMAKE_CURRENT_SOURCE_DIR)/generate_environment_variables.py
66
SCRIPT=@(CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_variables.py
77
@[end if]@
88

9-
export ROS_MAVEN_PATH=`python ${SCRIPT} --maven-path`
10-
export ROS_MAVEN_DEPLOYMENT_REPOSITORY=`python ${SCRIPT} --maven-deployment-repository`
11-
export ROS_MAVEN_REPOSITORY=`python ${SCRIPT} --maven-repository`
12-
9+
export ROS_MAVEN_PATH="`python ${SCRIPT} --maven-path`"
10+
export ROS_MAVEN_DEPLOYMENT_REPOSITORY="`python ${SCRIPT} --maven-deployment-repository`"
11+
export ROS_MAVEN_REPOSITORY="`python ${SCRIPT} --maven-repository`"

env-hooks/15.rosjava.sh.em

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ SCRIPT=@(CMAKE_CURRENT_SOURCE_DIR)/generate_environment_variables.py
66
SCRIPT=@(CMAKE_INSTALL_PREFIX)/share/rosjava_build_tools/generate_environment_variables.py
77
@[end if]@
88

9-
export ROS_MAVEN_PATH=`python ${SCRIPT} --maven-path`
10-
export ROS_MAVEN_DEPLOYMENT_REPOSITORY=`python ${SCRIPT} --maven-deployment-repository`
11-
export ROS_MAVEN_REPOSITORY=`python ${SCRIPT} --maven-repository`
9+
export ROS_MAVEN_PATH="`python ${SCRIPT} --maven-path`"
10+
export ROS_MAVEN_DEPLOYMENT_REPOSITORY="`python ${SCRIPT} --maven-deployment-repository`"
11+
export ROS_MAVEN_REPOSITORY="`python ${SCRIPT} --maven-repository`"

generate_environment_variables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get_workspaces(environ):
2424
value = environ[env_name] if env_name in environ else ''
2525
paths = [path for path in value.split(os.pathsep) if path]
2626
# remove non-workspace paths
27-
workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))]
27+
workspaces = [path.replace(' ', '\ ') for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))]
2828
return workspaces
2929

3030
def get_environment_variable(environ, key):

package.xml

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
11
<package>
22
<name>rosjava_build_tools</name>
3-
<version>0.2.0</version>
3+
<version>0.3.0</version>
44
<description>
5-
Simple tools and catkin modules for rosjava development.
5+
Simple tools and catkin modules for rosjava development.
66
</description>
77
<maintainer email="[email protected]">Daniel Stonier</maintainer>
88
<license>BSD</license>
99
<url type="website">http://ros.org/wiki/rosjava_build_tools</url>
1010
<url type="repository">https://github.com/ros-java/rosjava_build_tools</url>
1111
<url type="bugtracker">https://github.com/ros-java/rosjava_build_tools/issues</url>
12-
<author email="[email protected]">Daniel Stonier</author>
12+
<author>Daniel Stonier</author>
1313

1414
<buildtool_depend>catkin</buildtool_depend>
1515

16-
<build_depend>python-rospkg</build_depend>
17-
<build_depend>rospy</build_depend>
1816
<build_depend>java</build_depend>
1917
<build_depend>ant</build_depend>
20-
<build_depend>python-rosinstall-generator</build_depend>
21-
<run_depend>python-rospkg</run_depend>
22-
<run_depend>rospy</run_depend>
2318
<run_depend>java</run_depend>
2419
<run_depend>ant</run_depend>
2520
<run_depend>catkin</run_depend>
26-
<run_depend>python-rosinstall-generator</run_depend>
2721
</package>
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
#!/usr/bin/env python
22

3-
"""This script creates the skeleton of an android library package"""
3+
"""This script creates the skeleton of a rosjava library project"""
44

55
##############################################################################
66
# Imports
77
##############################################################################
88

99
from __future__ import print_function
10-
import argparse
11-
import os
1210
import sys
1311

14-
from rosjava_build_tools import create_rosjava_msg_project
12+
from rosjava_build_tools import create_rosjava_library_project
1513
import rosjava_build_tools.console as console
1614

1715
##############################################################################
@@ -20,7 +18,7 @@ import rosjava_build_tools.console as console
2018

2119
if __name__ == "__main__":
2220
try:
23-
sys.exit(create_rosjava_msg_project())
21+
sys.exit(create_rosjava_library_project())
2422
except Exception as e:
2523
console.logerror("%s : %s" % (str(e), type(e)))
2624
sys.exit(1)

scripts/catkin_create_rosjava_pkg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
"""This script creates the skeleton of an rosjava repo"""
3+
"""This script creates the skeleton of a rosjava catkin package (typically an entire repo)"""
44

55
##############################################################################
66
# Imports

scripts/catkin_create_rosjava_project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
"""This script creates the skeleton of an android library package"""
3+
"""This script creates the skeleton of a rosjava application project"""
44

55
##############################################################################
66
# Imports

setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@
1111
'scripts/catkin_create_android_library_project',
1212
'scripts/catkin_create_rosjava_pkg',
1313
'scripts/catkin_create_rosjava_project',
14-
'scripts/catkin_create_rosjava_msg_project',
14+
'scripts/catkin_create_rosjava_library_project',
1515
],
1616
package_data = {'rosjava_build_tools': [
1717
'templates/android_package/*',
1818
'templates/android_project/*',
19-
'templates/rosjava_msg_project/*',
19+
'templates/rosjava_library_project/*',
2020
'templates/rosjava_package/*',
2121
'templates/rosjava_project/*',
2222
'templates/init_repo/*',
2323
]},
24-
requires=['rospy' 'rospkg']
2524
)
2625

2726
setup(**d)

src/rosjava_build_tools/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import console
88
from create_package import init_android_package, init_rosjava_package
99
from create_android_project import create_android_project
10-
from create_rosjava_project import create_rosjava_project, create_rosjava_msg_project
10+
from create_rosjava_project import create_rosjava_project, create_rosjava_msg_project, create_rosjava_library_project
1111
from utils import which
1212
from release import scrape_for_release_message_packages
13+
import catkin

0 commit comments

Comments
 (0)