From 84e4caca89feb53bfd2678af79b2a9c901744b1e Mon Sep 17 00:00:00 2001
From: Daniel Stonier <d.stonier@gmail.com>
Date: Sun, 8 Sep 2013 15:01:14 +0900
Subject: [PATCH] multi-project build, readying for other packages.

---
 .project                                      |  2 +-
 build.gradle                                  | 53 +++++++++++++------
 rosjava_gradle_plugins/build.gradle           | 24 +++++++++
 .../CatkinPlugin.groovy                       |  0
 .../META-INF/gradle-plugins/catkin.properties |  0
 settings.gradle                               | 20 ++++++-
 6 files changed, 82 insertions(+), 17 deletions(-)
 create mode 100644 rosjava_gradle_plugins/build.gradle
 rename {src => rosjava_gradle_plugins/src}/main/groovy/com/github/rosjava/rosjava_gradle_plugins/CatkinPlugin.groovy (100%)
 rename {src => rosjava_gradle_plugins/src}/main/resources/META-INF/gradle-plugins/catkin.properties (100%)

diff --git a/.project b/.project
index 04ba724..9e7d834 100644
--- a/.project
+++ b/.project
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>rosjava_gradle_plugins</name>
+	<name>rosjava_bootstrap</name>
 	<comment></comment>
 	<projects>
 	</projects>
diff --git a/build.gradle b/build.gradle
index d8665fe..a994432 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,26 +1,49 @@
+/*
+ * Copyright (C) 2013 Google Inc.
+ *
+ * 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
+ *
+ * http://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.
+ */
 
 task wrapper(type: Wrapper) {
   gradleVersion = '1.5'
 }
 
-apply plugin: 'groovy'
-apply plugin: 'maven'
 
-dependencies {
-    compile gradleApi()
-    groovy localGroovy()
+allprojects {
+    group='org.ros.rosjava_bootstrap'
+    version='0.1.0-SNAPSHOT'
 }
-repositories {
-    mavenCentral()
-}
- 
-group='com.github.rosjava.rosjava_gradle_plugins'
-version='0.1.0-SNAPSHOT'
 
-uploadArchives {
+subprojects {
+    apply plugin: 'java'
+    apply plugin: 'maven'
+
     repositories {
-        mavenDeployer {
-            repository(url: uri('../repo'))
+        mavenLocal()
+        maven {
+            url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master'
         }
     }
-}
\ No newline at end of file
+
+    /*
+    uploadArchives {
+        repositories {
+            mavenDeployer {
+                repository(url: uri('../repo'))
+            }
+        }
+    }
+    */
+}
+
+defaultTasks 'install'
diff --git a/rosjava_gradle_plugins/build.gradle b/rosjava_gradle_plugins/build.gradle
new file mode 100644
index 0000000..3f1428a
--- /dev/null
+++ b/rosjava_gradle_plugins/build.gradle
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2013 Google Inc.
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+apply plugin: 'groovy'
+
+version='0.1.0'
+
+dependencies {
+    compile gradleApi()
+    groovy localGroovy()
+}
diff --git a/src/main/groovy/com/github/rosjava/rosjava_gradle_plugins/CatkinPlugin.groovy b/rosjava_gradle_plugins/src/main/groovy/com/github/rosjava/rosjava_gradle_plugins/CatkinPlugin.groovy
similarity index 100%
rename from src/main/groovy/com/github/rosjava/rosjava_gradle_plugins/CatkinPlugin.groovy
rename to rosjava_gradle_plugins/src/main/groovy/com/github/rosjava/rosjava_gradle_plugins/CatkinPlugin.groovy
diff --git a/src/main/resources/META-INF/gradle-plugins/catkin.properties b/rosjava_gradle_plugins/src/main/resources/META-INF/gradle-plugins/catkin.properties
similarity index 100%
rename from src/main/resources/META-INF/gradle-plugins/catkin.properties
rename to rosjava_gradle_plugins/src/main/resources/META-INF/gradle-plugins/catkin.properties
diff --git a/settings.gradle b/settings.gradle
index 28ae37a..98689ec 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1,19 @@
-rootProject.name = 'catkin'
\ No newline at end of file
+/*
+ * Copyright (C) 2013 Google Inc.
+ *
+ * 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
+ *
+ * http://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.
+ */
+
+/* rootProject.name = 'catkin' */
+
+include 'rosjava_gradle_plugins'
\ No newline at end of file
-- 
GitLab