Skip to content

Commit 83f7d30

Browse files
committed
Move CLI into nf-cli module
Signed-off-by: Ben Sherman <[email protected]>
1 parent c23e05b commit 83f7d30

File tree

68 files changed

+2983
-2790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2983
-2790
lines changed

build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ task compile {
237237

238238
def getRuntimeConfigs() {
239239
def names = subprojects
240-
.findAll { prj -> prj.name in ['nextflow','nf-commons','nf-httpfs','nf-lang','nf-lineage'] }
240+
.findAll { prj -> prj.name in ['nextflow','nf-cli-v1','nf-commons','nf-httpfs','nf-lang','nf-lineage'] }
241241
.collect { it.name }
242242

243243
FileCollection result = null
@@ -262,8 +262,10 @@ task exportClasspath {
262262
doLast {
263263
def home = System.getProperty('user.home')
264264
def all = getRuntimeConfigs()
265-
def libs = all.collect { File file -> /*println file.canonicalPath.replace(home, '$HOME');*/ file.canonicalPath; }
266-
['nextflow','nf-commons','nf-httpfs','nf-lang','nf-lineage'].each {libs << file("modules/$it/build/libs/${it}-${version}.jar").canonicalPath }
265+
def libs = all.collect { File file -> file.canonicalPath }
266+
['nextflow','nf-cli-v1','nf-commons','nf-httpfs','nf-lang','nf-lineage'].each {
267+
libs << file("modules/$it/build/libs/${it}-${version}.jar").canonicalPath
268+
}
267269
file('.launch.classpath').text = libs.unique().join(':')
268270
}
269271
}
@@ -276,7 +278,7 @@ ext.nexusEmail = project.findProperty('nexusEmail')
276278
// `signing.keyId` property needs to be defined in the `gradle.properties` file
277279
ext.enableSignArchives = project.findProperty('signing.keyId')
278280

279-
ext.coreProjects = projects( ':nextflow', ':nf-commons', ':nf-httpfs', ':nf-lang', ':nf-lineage' )
281+
ext.coreProjects = projects( ':nextflow', ':nf-cli-v1', ':nf-commons', ':nf-httpfs', ':nf-lang', ':nf-lineage' )
280282

281283
configure(coreProjects) {
282284
group = 'io.nextflow'

modules/nextflow/build.gradle

Lines changed: 21 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
plugins {
2-
id "com.gradleup.shadow" version "8.3.5"
3-
}
1+
/*
2+
* Copyright 2013-2025, Seqera Labs
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
416
apply plugin: 'groovy'
5-
apply plugin: 'application'
617

718
sourceSets {
819
main.java.srcDirs = []
@@ -13,14 +24,6 @@ sourceSets {
1324
test.resources.srcDirs = ['src/test/resources']
1425
}
1526

16-
compileGroovy {
17-
options.compilerArgs = ['-XDignore.symbol.file']
18-
}
19-
20-
configurations {
21-
lineageImplementation
22-
}
23-
2427
dependencies {
2528
api(project(':nf-commons'))
2629
api(project(':nf-httpfs'))
@@ -41,14 +44,13 @@ dependencies {
4144
api "commons-lang:commons-lang:2.6"
4245
api "commons-codec:commons-codec:1.15"
4346
api "commons-io:commons-io:2.15.1"
44-
api "com.beust:jcommander:1.35"
4547
api("com.esotericsoftware.kryo:kryo:2.24.0") { exclude group: 'com.esotericsoftware.minlog', module: 'minlog' }
46-
api('org.iq80.leveldb:leveldb:0.12')
47-
api('org.eclipse.jgit:org.eclipse.jgit:7.1.1.202505221757-r')
48-
api ('javax.activation:activation:1.1.1')
49-
api ('javax.mail:mail:1.4.7')
50-
api ('org.yaml:snakeyaml:2.2')
51-
api ('org.jsoup:jsoup:1.15.4')
48+
api 'org.iq80.leveldb:leveldb:0.12'
49+
api 'org.eclipse.jgit:org.eclipse.jgit:7.1.0.202411261347-r'
50+
api 'javax.activation:activation:1.1.1'
51+
api 'javax.mail:mail:1.4.7'
52+
api 'org.yaml:snakeyaml:2.2'
53+
api 'org.jsoup:jsoup:1.15.4'
5254
api 'jline:jline:2.9'
5355
api 'org.pf4j:pf4j:3.12.0'
5456
api 'dev.failsafe:failsafe:3.1.0'
@@ -63,35 +65,4 @@ dependencies {
6365
testFixturesApi ("org.spockframework:spock-core:2.3-groovy-4.0") { exclude group: 'org.apache.groovy' }
6466
testFixturesApi ('org.spockframework:spock-junit4:2.3-groovy-4.0') { exclude group: 'org.apache.groovy' }
6567
testFixturesApi 'com.google.jimfs:jimfs:1.2'
66-
// note: declare as separate dependency to avoid a circular dependency
67-
lineageImplementation (project(':nf-lineage'))
68-
}
69-
70-
71-
test {
72-
minHeapSize = "512m"
73-
maxHeapSize = "4096m"
74-
}
75-
76-
application {
77-
mainClass = 'nextflow.cli.Launcher'
78-
}
79-
80-
run{
81-
args( (project.hasProperty("runCmd") ? project.findProperty("runCmd") : "set a cmd to run").split(' ') )
82-
}
83-
84-
shadowJar {
85-
// add 'lineage' because it cannot be added to this project
86-
// explicitly otherwise it will result into a circular dependency
87-
configurations = [project.configurations.runtimeClasspath, project.configurations.lineageImplementation]
88-
archiveClassifier='one'
89-
manifest {
90-
attributes 'Main-Class': "$mainClassName"
91-
}
92-
mergeServiceFiles()
93-
mergeGroovyExtensionModules()
94-
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer) {
95-
resource = 'META-INF/extensions.idx'
96-
}
9768
}

0 commit comments

Comments
 (0)