Browse Source

Make plugin dependencies more flexible.

Define a 'plugin' function to use in place of 'project' that
will figure out where the plugin is living in the root gradle
project.

This allows the plugins to be included and built properly
when they are in a submodule of either the client or the meta
project.

Change-Id: Iacc3551ac9c0bf2343151eb9cf85296c85c5a28b
Reviewed-on: http://gerrit.dmdirc.com/4028
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
changes/28/4028/2
Chris Smith 9 years ago
parent
commit
63ce3c280b

+ 1
- 1
activewindow/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 12
- 0
build.gradle View File

@@ -130,3 +130,15 @@ buildscript {
130 130
 task wrapper(type: Wrapper) {
131 131
     gradleVersion = '2.1'
132 132
 }
133
+
134
+def plugin(name) {
135
+    if (allprojects.find { it.name == name }) {
136
+        project(name)
137
+    } else if (allprojects.find { it.name == 'plugins:' + name }) {
138
+        project('plugins:' + name)
139
+    } else if (allprojects.find { it.name == 'modules:plugins:' + name }) {
140
+        project('modules:plugins:' + name)
141
+    } else {
142
+        println "Couldn't find project $name"
143
+    }
144
+}

+ 1
- 1
contactlist/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 1
- 1
dcc/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 1
- 1
lagdisplay/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 1
- 1
mediasource_dbus/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':nowplaying')
2
+  compile plugin('nowplaying')
3 3
 }

+ 1
- 1
mediasource_dcop/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':nowplaying')
2
+  compile plugin('nowplaying')
3 3
 }

+ 1
- 1
mediasource_linux_title/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':nowplaying')
2
+  compile plugin('nowplaying')
3 3
 }

+ 1
- 1
mediasource_mplayer/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':nowplaying')
2
+  compile plugin('nowplaying')
3 3
 }

+ 1
- 1
mediasource_vlc/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':nowplaying')
2
+  compile plugin('nowplaying')
3 3
 }

+ 1
- 1
mediasource_windows/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':nowplaying')
2
+  compile plugin('nowplaying')
3 3
 }

+ 1
- 1
nickcolours/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 1
- 1
notifications/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 1
- 1
nowplaying/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 1
- 1
osd/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 1
- 1
osx_integration/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 2
- 2
serverlistdialog/build.gradle View File

@@ -1,4 +1,4 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
3
-  compile project(':serverlists')
2
+  compile plugin('ui_swing')
3
+  compile plugin('serverlists')
4 4
 }

+ 1
- 1
systray/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

+ 1
- 1
windowflashing/build.gradle View File

@@ -1,5 +1,5 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
   bundle group: 'net.java.dev.jna', name: 'jna', version: '4.1.0'
4 4
   bundle group: 'net.java.dev.jna', name: 'jna-platform', version: '4.1.0'
5 5
 }

+ 1
- 1
windowstatus/build.gradle View File

@@ -1,3 +1,3 @@
1 1
 dependencies {
2
-  compile project(':ui_swing')
2
+  compile plugin('ui_swing')
3 3
 }

Loading…
Cancel
Save