Skip to content

Commit 00dd143

Browse files
Fix build warning + plugins assemble (#2634)
Signed-off-by: Jorge Aguilera <[email protected]>
1 parent 15698a4 commit 00dd143

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ compile:
4343
@echo "DONE `date`"
4444

4545
assemble:
46-
./gradlew compile assemble :plugins:assemble
46+
./gradlew compile assemble
4747

4848
check:
4949
./gradlew check

plugins/build.gradle

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ subprojects {
6363
* Creates plugin zip and json meta file in the plugin `build/libs` directory
6464
*/
6565
task makeZip(type: Jar) {
66+
group 'nextflow'
6667
into('classes') { with jar }
6768
into('lib') { from configurations.runtimeClasspath }
6869
manifest.from file('src/resources/META-INF/MANIFEST.MF')
@@ -84,36 +85,45 @@ subprojects {
8485
}
8586
""".stripIndent()
8687
}
88+
outputs.file("$buildDir/libs/${project.name}-${project.version}.zip")
8789
}
8890

8991
/*
9092
* Copy the plugin dependencies in the subproject `build/target/libs` directory
9193
*/
9294
task copyPluginLibs(type: Sync) {
95+
group 'nextflow'
9396
from configurations.runtimeClasspath
9497
into 'build/target/libs'
9598
}
9699

97100
/*
98101
* Copy the plugin in the project root build/plugins directory
99102
*/
100-
task copyPluginZip(type: Copy) {
101-
from makeZip
103+
task copyPluginZip(type: Copy, dependsOn: project.tasks.findByName('makeZip')) {
104+
group 'nextflow'
105+
from project.tasks.findByName('makeZip')
102106
into "$rootProject.buildDir/plugins"
107+
outputs.file("$rootProject.buildDir/plugins/${project.name}-${project.version}.zip")
108+
doLast {
109+
ant.unzip(
110+
src: "$rootProject.buildDir/plugins/${project.name}-${project.version}.zip",
111+
dest: "$rootProject.buildDir/plugins/${project.name}-${project.version}"
112+
)
113+
}
103114
}
104115

105116
/*
106-
* Unzip the plugin artifact in the project root build/plugins directory
107-
*/
108-
task unzipPlugin(type: Copy, dependsOn: copyPluginZip) {
109-
from zipTree("$rootProject.buildDir/plugins/${project.name}-${project.version}.zip")
110-
into "$rootProject.buildDir/plugins/${project.name}-${project.version}"
111-
}
117+
* "install" the plugin the project root build/plugins directory
118+
*/
119+
project.parent.tasks.getByName("assemble").dependsOn << copyPluginZip
120+
112121

113122
/*
114123
* Upload the plugin zip & json meta file to the corresponding GitHub repo
115124
*/
116125
task uploadPlugin(type: GithubUploader, dependsOn: makeZip) {
126+
group 'nextflow'
117127
assets = providers.provider {["$buildDir/libs/${project.name}-${project.version}.zip",
118128
"$buildDir/libs/${project.name}-${project.version}-meta.json" ]}
119129
release = providers.provider { project.version }
@@ -173,7 +183,7 @@ classes.dependsOn subprojects.copyPluginLibs
173183
/*
174184
* "install" the plugin the project root build/plugins directory
175185
*/
176-
assemble.dependsOn subprojects.unzipPlugin
186+
project.parent.tasks.getByName("assemble").dependsOn << assemble
177187

178188
/*
179189
* Merge and publish the plugins index file

0 commit comments

Comments
 (0)