Skip to content

Commit

Permalink
Bump groovy 4 + nextflow 24.01.x
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Mar 5, 2024
1 parent 2faf688 commit c640b64
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 13 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ mm =
endif

clean:
rm -rf .nextflow*
rm -rf work
rm -rf build
rm -rf plugins/*/build
./gradlew clean

compile:
Expand Down Expand Up @@ -44,6 +48,9 @@ else
./gradlew ${mm}test --tests ${class}
endif

assemble:
./gradlew assemble

#
# generate build zips under build/plugins
# you can install the plugin copying manually these files to $HOME/.nextflow/plugins
Expand All @@ -62,4 +69,4 @@ upload-plugins:
./gradlew plugins:upload

publish-index:
./gradlew plugins:publishIndex
./gradlew plugins:publishIndex
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ To build and test the plugin during development, configure a local Nextflow buil

3. Compile the plugin alongside the Nextflow code:
```bash
make compile
make assemble
```

4. Run Nextflow with the plugin, using `./launch.sh` as a drop-in replacement for the `nextflow` command, and adding the option `-plugins nf-hello` to load the plugin:
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 6 additions & 6 deletions plugins/nf-hello/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sourceSets {
}

ext{
nextflowVersion = '23.04.0'
nextflowVersion = '24.01.0-edge'
}

dependencies {
Expand All @@ -61,14 +61,14 @@ dependencies {
// add here plugins depepencies

// test configuration
testImplementation "org.codehaus.groovy:groovy:3.0.17"
testImplementation "org.codehaus.groovy:groovy-nio:3.0.17"
testImplementation "org.apache.groovy:groovy:4.0.18"
testImplementation "org.apache.groovy:groovy-nio:4.0.18"
testImplementation "io.nextflow:nextflow:$nextflowVersion"
testImplementation ("org.codehaus.groovy:groovy-test:3.0.17") { exclude group: 'org.codehaus.groovy' }
testImplementation ("org.apache.groovy:groovy-test:4.0.18") { exclude group: 'org.apache.groovy' }
testImplementation ("cglib:cglib-nodep:3.3.0")
testImplementation ("org.objenesis:objenesis:3.1")
testImplementation ("org.spockframework:spock-core:2.2-groovy-3.0") { exclude group: 'org.codehaus.groovy'; exclude group: 'net.bytebuddy' }
testImplementation ('org.spockframework:spock-junit4:2.2-groovy-3.0') { exclude group: 'org.codehaus.groovy'; exclude group: 'net.bytebuddy' }
testImplementation ("org.spockframework:spock-core:2.3-groovy-4.0") { exclude group: 'org.apache.groovy'; exclude group: 'net.bytebuddy' }
testImplementation ('org.spockframework:spock-junit4:2.3-groovy-4.0') { exclude group: 'org.apache.groovy'; exclude group: 'net.bytebuddy' }
testImplementation ('com.google.jimfs:jimfs:1.1')

testImplementation(testFixtures("io.nextflow:nextflow:$nextflowVersion"))
Expand Down
4 changes: 2 additions & 2 deletions plugins/nf-hello/src/resources/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Plugin-Id: nf-hello
Plugin-Version: 0.4.0
Plugin-Version: 0.5.0
Plugin-Class: nextflow.hello.HelloPlugin
Plugin-Provider: nextflow
Plugin-Requires: >=22.10.0
Plugin-Requires: >=24.01.0-edge
16 changes: 14 additions & 2 deletions plugins/nf-hello/src/test/nextflow/hello/HelloDslTest.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package nextflow.hello

import java.nio.file.Files
import java.util.jar.Manifest

import nextflow.Channel
import nextflow.plugin.Plugins
import nextflow.plugin.TestPluginDescriptorFinder
Expand Down Expand Up @@ -35,9 +38,18 @@ class HelloDslTest extends Dsl2Spec{
@Override
protected PluginDescriptorFinder createPluginDescriptorFinder() {
return new TestPluginDescriptorFinder(){

@Override
protected Path getManifestPath(Path pluginPath) {
return pluginPath.resolve('build/resources/main/META-INF/MANIFEST.MF')
protected Manifest readManifestFromDirectory(Path pluginPath) {
if( !Files.isDirectory(pluginPath) )
return null

final manifestPath = pluginPath.resolve('build/resources/main/META-INF/MANIFEST.MF')
if( !Files.exists(manifestPath) )
return null

final input = Files.newInputStream(manifestPath)
return new Manifest(input)
}
}
}
Expand Down

0 comments on commit c640b64

Please sign in to comment.