This repository was archived by the owner on Aug 20, 2024. It is now read-only.
forked from nextflow-io/nf-schema
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit udates the gradle build. More in details: - Update Gradle to version 7.6 - Update Nextflow runtime to version 22.10.x - Update Groovy runtime to version 3.0.14 - Fixed some failing tests - Update Java min version to 11 - Update GitHub action build Signed-off-by: Paolo Di Tommaso <[email protected]>
- Loading branch information
1 parent
b09fb65
commit 0a1718e
Showing
11 changed files
with
121 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
*/ | ||
|
||
plugins { | ||
// Support convention plugins written in Groovy. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build. | ||
id 'groovy-gradle-plugin' | ||
} | ||
|
||
repositories { | ||
// Use the plugin portal to apply community plugins in convention plugins. | ||
gradlePluginPortal() | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
buildSrc/src/main/groovy/io.nextflow.groovy-application-conventions.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
*/ | ||
|
||
plugins { | ||
// Apply the common convention plugin for shared build configuration between library and application projects. | ||
id 'io.nextflow.groovy-common-conventions' | ||
|
||
// Apply the application plugin to add support for building a CLI application in Java. | ||
id 'application' | ||
} |
28 changes: 28 additions & 0 deletions
28
buildSrc/src/main/groovy/io.nextflow.groovy-common-conventions.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
*/ | ||
|
||
plugins { | ||
// Apply the groovy Plugin to add support for Groovy. | ||
id 'groovy' | ||
} | ||
|
||
repositories { | ||
// Use Maven Central for resolving dependencies. | ||
mavenCentral() | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(17) | ||
} | ||
} | ||
|
||
compileJava { | ||
options.release.set(11) | ||
} | ||
|
||
tasks.withType(GroovyCompile) { | ||
sourceCompatibility = '11' | ||
targetCompatibility = '11' | ||
} |
11 changes: 11 additions & 0 deletions
11
buildSrc/src/main/groovy/io.nextflow.groovy-library-conventions.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
*/ | ||
|
||
plugins { | ||
// Apply the common convention plugin for shared build configuration between library and application projects. | ||
id 'io.nextflow.groovy-common-conventions' | ||
// Apply the java-library plugin for API and implementation separation. | ||
id 'java-library' | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
nextflowVersion = 22.10.0 | ||
groovyVersion = 3.0.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-7.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ ext.github_organization = 'nextflow-io' | |
ext.github_username = project.findProperty('github_username') ?: 'pditommaso' | ||
ext.github_access_token = project.findProperty('github_access_token') ?: System.getenv('GITHUB_TOKEN') | ||
ext.github_commit_email = project.findProperty('github_commit_email') ?: '[email protected]' | ||
ext.nextflowVersion = '22.08.1-edge' | ||
|
||
jar.enabled = false | ||
|
||
|
@@ -59,7 +58,7 @@ subprojects { | |
apply plugin: 'java' | ||
apply plugin: 'groovy' | ||
apply plugin: 'io.nextflow.nf-build-plugin' | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
|
@@ -95,6 +94,8 @@ subprojects { | |
"sha512sum": "${computeSha512(zip)}" | ||
} | ||
""".stripIndent() | ||
// cleanup tmp dir | ||
file("$buildDir/tmp/makeZip").deleteDir() | ||
} | ||
outputs.file("$buildDir/libs/${project.name}-${project.version}.zip") | ||
} | ||
|
@@ -138,13 +139,32 @@ subprojects { | |
skipExisting = true | ||
} | ||
|
||
jar { | ||
from sourceSets.main.allSource | ||
doLast { | ||
file("$buildDir/tmp/jar").deleteDir() | ||
} | ||
} | ||
|
||
tasks.withType(GenerateModuleMetadata) { | ||
enabled = false | ||
} | ||
|
||
task upload(dependsOn: [uploadPlugin] ) { } | ||
} | ||
|
||
/* | ||
* Upload all plugins to the corresponding GitHub repos | ||
*/ | ||
task upload(dependsOn: [subprojects.uploadPlugin]) { } | ||
|
||
classes.dependsOn subprojects.copyPluginLibs | ||
/* | ||
* Copies the plugins required dependencies in the corresponding lib directory | ||
*/ | ||
classes.dependsOn subprojects.copyPluginLibs | ||
|
||
|
||
/* | ||
* Merge and publish the plugins index file | ||
*/ | ||
task publishIndex( type: io.nextflow.gradle.tasks.GithubRepositoryPublisher ) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
package nextflow.validation | ||
|
||
import java.nio.file.Path | ||
|
||
import nextflow.plugin.Plugins | ||
import nextflow.plugin.TestPluginDescriptorFinder | ||
import nextflow.plugin.TestPluginManager | ||
import nextflow.plugin.extension.PluginExtensionProvider | ||
import org.junit.Rule | ||
import org.pf4j.PluginDescriptorFinder | ||
import spock.lang.Shared | ||
import spock.lang.TempDir | ||
import test.Dsl2Spec | ||
import test.OutputCapture | ||
|
||
import java.nio.file.Path | ||
|
||
|
||
/** | ||
* @author : jorge <[email protected]> | ||
* | ||
|
@@ -398,7 +395,7 @@ class PluginExtensionMethodsTest extends Dsl2Spec{ | |
|
||
then: | ||
noExceptionThrown() | ||
stdout.size == 10 | ||
stdout.size() == 10 | ||
} | ||
|
||
def 'should print a help message with argument options' () { | ||
|
@@ -424,7 +421,7 @@ class PluginExtensionMethodsTest extends Dsl2Spec{ | |
|
||
then: | ||
noExceptionThrown() | ||
stdout.size == 1 | ||
stdout.size() == 1 | ||
} | ||
|
||
def 'should print a help message of one parameter' () { | ||
|
@@ -457,7 +454,7 @@ class PluginExtensionMethodsTest extends Dsl2Spec{ | |
|
||
then: | ||
noExceptionThrown() | ||
stdout.size == 7 | ||
stdout.size() == 7 | ||
} | ||
|
||
def 'should fail when help param doesnt exist' () { | ||
|
@@ -517,7 +514,7 @@ class PluginExtensionMethodsTest extends Dsl2Spec{ | |
|
||
then: | ||
noExceptionThrown() | ||
stdout.size == 11 | ||
stdout.size() == 11 | ||
stdout ==~ /.*\[0;34moutdir : .\[0;32moutDir.*/ | ||
} | ||
} |