Skip to content

Commit 5699831

Browse files
committed
use the nextflow gradle plugin
1 parent 16263f6 commit 5699831

File tree

106 files changed

+69
-98
lines changed

Some content is hidden

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

106 files changed

+69
-98
lines changed

.github/workflows/build-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
python-version: 3.x
2020
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
2121
- name: Obtain version from MANIFEST.MF
22-
run: echo "plugin_version=$(grep "Plugin-Version" plugins/nf-schema/src/resources/META-INF/MANIFEST.MF | awk '{print $2}' | awk -F '.' '{print $1"."$2}')" >> $GITHUB_ENV
22+
run: echo "plugin_version=$(grep "version = " build.gradle | sed -e 's/version = //' | cut -d "'" -f 2)" >> $GITHUB_ENV
2323
- name: Setup git user
2424
run: |
2525
git config --global user.name "${{github.actor}}"

Makefile

Lines changed: 12 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,23 @@
1-
2-
config ?= compileClasspath
3-
version ?= $(shell grep 'Plugin-Version' plugins/nf-schema/src/resources/META-INF/MANIFEST.MF | awk '{ print $$2 }')
4-
5-
ifdef module
6-
mm = :${module}:
7-
else
8-
mm =
9-
endif
1+
# Build the plugin
2+
assemble:
3+
./gradlew assemble
104

115
clean:
6+
rm -rf .nextflow*
7+
rm -rf work
8+
rm -rf build
129
./gradlew clean
1310

14-
compile:
15-
./gradlew compileGroovy
16-
@echo "DONE `date`"
17-
18-
19-
check:
20-
./gradlew check
21-
22-
23-
#
24-
# Show dependencies try `make deps config=runtime`, `make deps config=google`
25-
#
26-
deps:
27-
./gradlew -q ${mm}dependencies --configuration ${config}
28-
29-
deps-all:
30-
./gradlew -q dependencyInsight --configuration ${config} --dependency ${module}
31-
32-
#
33-
# Refresh SNAPSHOTs dependencies
34-
#
35-
refresh:
36-
./gradlew --refresh-dependencies
37-
3811
#
3912
# Run all tests or selected ones
4013
#
4114
test:
42-
ifndef class
43-
./gradlew ${mm}test
44-
else
45-
./gradlew ${mm}test --tests ${class}
46-
endif
47-
15+
./gradlew test
4816

17+
# Install the plugin into local nextflow plugins dir
4918
install:
50-
./gradlew copyPluginZip
51-
rm -rf ${HOME}/.nextflow/plugins/nf-schema-${version}
52-
cp -r build/plugins/nf-schema-${version} ${HOME}/.nextflow/plugins/nf-schema-${version}
53-
54-
#
55-
# Upload JAR artifacts to Maven Central
56-
#
57-
upload:
58-
./gradlew upload
59-
60-
61-
upload-plugins:
62-
./gradlew plugins:upload
19+
./gradlew install
6320

64-
publish-index:
65-
./gradlew plugins:publishIndex
21+
# Publish the plugin
22+
release:
23+
./gradlew releasePlugin

build.gradle

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
plugins {
2+
id 'io.nextflow.nextflow-plugin' version '0.0.1-alpha2'
3+
}
4+
5+
dependencies {
6+
implementation 'org.json:json:20240303'
7+
implementation 'dev.harrel:json-schema:1.5.0'
8+
implementation 'com.sanctionco.jmail:jmail:1.6.3' // Needed for e-mail format validation
9+
}
10+
11+
version = '2.4.0dev'
12+
13+
nextflowPlugin {
14+
nextflowVersion = '24.10.0'
15+
16+
provider = 'nextflow'
17+
className = 'nextflow.validation.ValidationPlugin'
18+
extensionPoints = [
19+
'nextflow.validation.ValidationExtension',
20+
'nextflow.validation.ValidationObserverFactory'
21+
]
22+
23+
publishing {
24+
github {
25+
repository = 'nextflow-io/nf-schema'
26+
userName = project.findProperty('github_username')
27+
authToken = project.findProperty('github_access_token')
28+
email = project.findProperty('github_commit_email')
29+
30+
indexUrl = 'https://github.com/nextflow-io/plugins/blob/main/plugins.json'
31+
}
32+
}
33+
}

docs/contributing/setup.md

Lines changed: 21 additions & 31 deletions
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

launch.sh

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

plugins/nf-schema/src/resources/META-INF/MANIFEST.MF

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

plugins/nf-schema/src/resources/META-INF/extensions.idx

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

settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@
88
*/
99

1010
rootProject.name = 'nf-schema'
11-
include 'plugins'
12-
include('plugins:nf-schema')

0 commit comments

Comments
 (0)