Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rosjava Bootstrap Gradle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CeTI
ROS
ROS Java Packages
Rosjava Bootstrap Gradle
Commits
0a9b7f2d
Commit
0a9b7f2d
authored
Sep 8, 2013
by
Daniel Stonier
Browse files
Options
Downloads
Patches
Plain Diff
message dependency listing.
parent
181d987b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/groovy/com/github/rosjava/rosjava_gradle_plugins/CatkinPlugin.groovy
+24
-8
24 additions, 8 deletions
...github/rosjava/rosjava_gradle_plugins/CatkinPlugin.groovy
with
24 additions
and
8 deletions
src/main/groovy/com/github/rosjava/rosjava_gradle_plugins/CatkinPlugin.groovy
+
24
−
8
View file @
0a9b7f2d
...
@@ -6,11 +6,10 @@ import org.gradle.api.Task;
...
@@ -6,11 +6,10 @@ import org.gradle.api.Task;
import
org.gradle.api.*
;
import
org.gradle.api.*
;
/*
/*
* Provides catkin information to the gradle build, defining properties for
* Provides catkin information to the gradle build, defining properties:
* use by the project:
*
*
* - project.catkin.rosPackagePath
* - project.catkin.rosPackagePath
: list of Strings
* - project.catkin.packages
* - project.catkin.packages
: dictionary of CatkinPackage objects
*
*
* The latter can be iterated over for information:
* The latter can be iterated over for information:
*
*
...
@@ -21,6 +20,10 @@ import org.gradle.api.*;
...
@@ -21,6 +20,10 @@ import org.gradle.api.*;
* pkg.dependencies.each { d ->
* pkg.dependencies.each { d ->
* println d
* println d
* }
* }
* // filtered list of *_msg dependencies.
* pkg.messageDependencies().each { d ->
* println d
* }
* }
* }
*
*
* Use this only once in the root of a multi-project gradle build - it will
* Use this only once in the root of a multi-project gradle build - it will
...
@@ -37,7 +40,6 @@ class CatkinPlugin implements Plugin<Project> {
...
@@ -37,7 +40,6 @@ class CatkinPlugin implements Plugin<Project> {
project
.
catkin
.
rosPackagePath
=
[]
project
.
catkin
.
rosPackagePath
=
[]
project
.
catkin
.
rosPackagePath
=
"$System.env.ROS_PACKAGE_PATH"
.
split
(
":"
)
project
.
catkin
.
rosPackagePath
=
"$System.env.ROS_PACKAGE_PATH"
.
split
(
":"
)
project
.
catkin
.
rosPackagePath
.
each
{
rosPackageRoot
->
project
.
catkin
.
rosPackagePath
.
each
{
rosPackageRoot
->
println
(
"RosPackageRoot.........${rosPackageRoot}"
)
def
manifestTree
=
project
.
fileTree
(
dir:
rosPackageRoot
,
include:
'**/package.xml'
)
def
manifestTree
=
project
.
fileTree
(
dir:
rosPackageRoot
,
include:
'**/package.xml'
)
manifestTree
.
each
{
file
->
manifestTree
.
each
{
file
->
def
pkg
=
new
CatkinPackage
(
file
)
def
pkg
=
new
CatkinPackage
(
file
)
...
@@ -46,7 +48,7 @@ class CatkinPlugin implements Plugin<Project> {
...
@@ -46,7 +48,7 @@ class CatkinPlugin implements Plugin<Project> {
}
}
println
(
"CatkinPlugin is happy, you should be too."
)
println
(
"CatkinPlugin is happy, you should be too."
)
project
.
task
(
'catkinPackageInfo'
)
<<
{
project
.
task
(
'catkinPackageInfo'
)
<<
{
println
"I'll teach your grandmother to suck eggs!"
println
(
"CatkinPlugin is happy, you should be too."
)
println
(
"rosPackagePath........."
+
project
.
catkin
.
rosPackagePath
)
println
(
"rosPackagePath........."
+
project
.
catkin
.
rosPackagePath
)
println
(
"Catkin Packages"
)
println
(
"Catkin Packages"
)
project
.
catkin
.
packages
.
each
{
pkg
->
project
.
catkin
.
packages
.
each
{
pkg
->
...
@@ -95,7 +97,21 @@ class CatkinPackage {
...
@@ -95,7 +97,21 @@ class CatkinPackage {
out
+=
" "
+
d
+
"\n"
out
+=
" "
+
d
+
"\n"
}
}
return
out
return
out
}
/*
* Find and annotate a list of package package dependencies.
* Useful for message artifact generation).
*
* @return List<String> : dependencies (package name strings)
*/
def
List
<
String
>
messageDependencies
()
{
List
<
String
>
msgDependencies
=
[]
dependencies
.
each
{
d
->
if
(
d
.
contains
(
"_msgs"
)
)
{
msgDependencies
.
add
(
d
)
}
}
return
msgDependencies
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment