Skip to content

Commit d956da2

Browse files
pditommasoclaude
andauthored
Rename publishPlugin to releasePlugin and remove GitHub publishing (#7)
- Rename publishPlugin -> releasePlugin - Rename publishPluginToRegistry -> releasePluginToRegistry - Update task descriptions to use proper capitalization - Update all tests and documentation references 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent 16c5f25 commit d956da2

File tree

11 files changed

+103
-615
lines changed

11 files changed

+103
-615
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ nextflowPlugin {
4646
```
4747

4848
This will add some useful tasks to your Gradle build:
49-
* `assemble` - compile the Nextflow plugin code and assemble it into a zip file
50-
* `installPlugin` - copy the assembled plugin into your local Nextflow plugins dir
51-
* `releasePlugin` - publish the assembled plugin to the plugin registry
49+
* `assemble` - Compile the Nextflow plugin code and assemble it into a zip file
50+
* `installPlugin` - Copy the assembled plugin into your local Nextflow plugins dir
51+
* `releasePlugin` - Release the assembled plugin to the plugin registry
5252

5353
You should also ensure that your project's `settings.gradle` declares the plugin name, eg:
5454
```gradle

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ dependencies {
1818
implementation 'com.google.code.gson:gson:2.10.1'
1919
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
2020
implementation 'org.apache.httpcomponents:httpmime:4.5.14'
21+
22+
testImplementation('org.spockframework:spock-core:2.3-groovy-3.0')
23+
}
24+
25+
test {
26+
useJUnitPlatform()
2127
}
2228

2329
shadowJar {

src/main/groovy/io/nextflow/gradle/NextflowPlugin.groovy

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package io.nextflow.gradle
22

3-
import io.nextflow.gradle.github.GithubUploadTask
4-
import io.nextflow.gradle.github.PluginMetadataTask
5-
import io.nextflow.gradle.github.UpdateJsonIndexTask
63
import io.nextflow.gradle.registry.RegistryUploadTask
74
import org.gradle.api.Plugin
85
import org.gradle.api.Project
@@ -132,41 +129,19 @@ class NextflowPlugin implements Plugin<Project> {
132129

133130
// add registry publish task, if configured
134131
if (config.publishing.registry) {
135-
// publishPluginToRegistry - publishes plugin to a plugin registry
136-
project.tasks.register('publishPluginToRegistry', RegistryUploadTask)
137-
project.tasks.publishPluginToRegistry.dependsOn << project.tasks.packagePlugin
138-
publishTasks << project.tasks.publishPluginToRegistry
132+
// releasePluginToRegistry - publishes plugin to a plugin registry
133+
project.tasks.register('releasePluginToRegistry', RegistryUploadTask)
134+
project.tasks.releasePluginToRegistry.dependsOn << project.tasks.packagePlugin
135+
publishTasks << project.tasks.releasePluginToRegistry
139136
}
140137

141-
// add github publish task(s), if configured
142-
if (config.publishing.github) {
143-
// generateGithubMeta - creates the meta.json file
144-
project.tasks.register('generateGithubMeta', PluginMetadataTask)
145-
project.tasks.generateGithubMeta.dependsOn << project.tasks.packagePlugin
146-
project.tasks.assemble.dependsOn << project.tasks.generateGithubMeta
147-
148-
// publishPluginToGithub - publishes plugin assets to a github repo
149-
project.tasks.register('publishPluginToGithub', GithubUploadTask)
150-
project.tasks.publishPluginToGithub.dependsOn << [
151-
project.tasks.packagePlugin,
152-
project.tasks.generateGithubMeta
153-
]
154-
publishTasks << project.tasks.publishPluginToGithub
155-
156-
// updateGithubIndex - updates the central plugins.json index
157-
if (config.publishing.github.updateIndex) {
158-
project.tasks.register('updateGithubIndex', UpdateJsonIndexTask)
159-
project.tasks.updateGithubIndex.dependsOn << project.tasks.generateGithubMeta
160-
publishTasks << project.tasks.updateGithubIndex
161-
}
162-
}
163138

164139
// finally, configure the destination-agnostic 'release' task
165140
if (!publishTasks.isEmpty()) {
166141
// releasePlugin - all the release/publishing actions
167142
project.tasks.register('releasePlugin', {
168143
group = 'Nextflow Plugin'
169-
description = 'publish plugin to configured destinations'
144+
description = 'Release plugin to configured destination'
170145
})
171146
for (task in publishTasks) {
172147
project.tasks.releasePlugin.dependsOn << task

src/main/groovy/io/nextflow/gradle/PluginPublishConfig.groovy

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.nextflow.gradle
22

33
import groovy.transform.CompileStatic
4-
import io.nextflow.gradle.github.GithubPublishConfig
54
import io.nextflow.gradle.registry.RegistryPublishConfig
65
import org.gradle.api.Project
76

@@ -13,11 +12,6 @@ import org.gradle.api.Project
1312
class PluginPublishConfig {
1413
private final Project project
1514

16-
/**
17-
* Configuration for publishing to github
18-
*/
19-
GithubPublishConfig github
20-
2115
/**
2216
* Configuration for publishing to a registry
2317
*/
@@ -29,12 +23,6 @@ class PluginPublishConfig {
2923

3024
def validate() {}
3125

32-
// initialises the 'github' sub-config
33-
def github(Closure config) {
34-
github = new GithubPublishConfig(project)
35-
project.configure(github, config)
36-
}
37-
3826
def registry(Closure config) {
3927
registry = new RegistryPublishConfig(project)
4028
project.configure(registry, config)

src/main/groovy/io/nextflow/gradle/github/GithubClient.groovy

Lines changed: 0 additions & 235 deletions
This file was deleted.

0 commit comments

Comments
 (0)