Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 9 additions & 70 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,82 +1,21 @@
config ?= compileClasspath
version ?= $(shell grep 'Plugin-Version' plugins/nf-sqldb/src/resources/META-INF/MANIFEST.MF | awk '{ print $$2 }')

ifdef module
mm = :${module}:
else
mm =
endif
# Build the plugin
assemble:
./gradlew assemble

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

compile:
./gradlew compileGroovy
@echo "DONE `date`"


check:
./gradlew check


#
# Show dependencies try `make deps config=runtime`, `make deps config=google`
#
deps:
./gradlew -q ${mm}dependencies --configuration ${config}

deps-all:
./gradlew -q dependencyInsight --configuration ${config} --dependency ${module}

#
# Refresh SNAPSHOTs dependencies
#
refresh:
./gradlew --refresh-dependencies

#
# Run all tests or selected ones
#
# Run plugin unit tests
test:
ifndef class
./gradlew ${mm}test
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
#
buildPlugins:
./gradlew copyPluginZip

#
# Upload JAR artifacts to Maven Central
#
upload:
./gradlew upload


upload-plugins:
./gradlew plugins:upload

publish-index:
./gradlew plugins:publishIndex
./gradlew test

# Install the plugin into local nextflow plugins dir
install:
./gradlew copyPluginZip
rm -rf ${HOME}/.nextflow/plugins/nf-sqldb-${version}
cp -r build/plugins/nf-sqldb-${version} ${HOME}/.nextflow/plugins/nf-sqldb-${version}

./gradlew install

publish-jar:
./gradlew plugins:nf-sqldb:publishMavenPublicationToMavenRepository
# Publish the plugin
release:
./gradlew releasePlugin
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,4 @@ The `CSVREAD` function provided by the H2 database engine allows you to query an
Like all dataflow operators in Nextflow, the operators provided by this plugin are executed asynchronously.

In particular, data inserted using the `sqlInsert` operator is _not_ guaranteed to be available to any subsequent queries using the `fromQuery` operator, as it is not possible to make a channel factory operation dependent on some upstream operation.

77 changes: 22 additions & 55 deletions plugins/nf-sqldb/build.gradle → build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,12 @@
*/

plugins {
// Apply the groovy plugin to add support for Groovy
id 'io.nextflow.groovy-library-conventions'
id 'idea'
id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.6'
id 'de.undercouch.download' version '4.1.2'
}

group = 'io.nextflow'
// DO NOT SET THE VERSION HERE
// THE VERSION FOR PLUGINS IS DEFINED IN THE `/resources/META-INF/MANIFEST.NF` file

idea {
module.inheritOutputDirs = true
}
// Plugin version (from latest MANIFEST.MF)
version = '0.7.1'

repositories {
mavenCentral()
Expand All @@ -36,29 +29,8 @@ repositories {
maven { url = 'https://s3-eu-west-1.amazonaws.com/maven.seqera.io/snapshots' }
}

configurations {
// see https://docs.gradle.org/4.1/userguide/dependency_management.html#sub:exclude_transitive_dependencies
runtimeClasspath.exclude group: 'org.slf4j', module: 'slf4j-api'
}

sourceSets {
main.java.srcDirs = []
main.groovy.srcDirs = ['src/main']
main.resources.srcDirs = ['src/resources']
test.groovy.srcDirs = ['src/test']
test.java.srcDirs = []
test.resources.srcDirs = []
}

ext{
nextflowVersion = '25.04.0'
}

dependencies {
compileOnly "io.nextflow:nextflow:$nextflowVersion"
compileOnly 'org.slf4j:slf4j-api:2.0.16'
compileOnly 'org.pf4j:pf4j:3.12.0'

// Database dependencies
api("org.apache.groovy:groovy-sql:4.0.26") { transitive = false }
api 'com.h2database:h2:1.4.200'
api 'mysql:mysql-connector-java:8.0.33'
Expand All @@ -73,29 +45,18 @@ dependencies {

//NOTE: Had to remove the slf4j jar due to a conflict
implementation fileTree(dir: 'src/dist/lib/libs', include: '*.jar')

// test configuration
testImplementation "org.apache.groovy:groovy:4.0.26"
testImplementation "org.apache.groovy:groovy-nio:4.0.26"
testImplementation "io.nextflow:nextflow:$nextflowVersion"
testImplementation ("org.apache.groovy:groovy-test:4.0.26") { exclude group: 'org.apache.groovy' }
testImplementation ("cglib:cglib-nodep:3.3.0")
testImplementation ("org.objenesis:objenesis:3.1")
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"))
testImplementation(testFixtures("io.nextflow:nf-commons:$nextflowVersion"))

// see https://docs.gradle.org/4.1/userguide/dependency_management.html#sec:module_replacement
modules {
module("commons-logging:commons-logging") { replacedBy("org.slf4j:jcl-over-slf4j") }
}
}

test {
useJUnitPlatform()
nextflowPlugin {
// Minimum Nextflow version
nextflowVersion = '25.04.0'

// Plugin metadata
provider = 'Seqera Labs'
className = 'nextflow.sql.SqlPlugin'
extensionPoints = [
'nextflow.sql.ChannelSqlExtension'
]
}

/**
Expand Down Expand Up @@ -127,5 +88,11 @@ task copyAthenDep(dependsOn: unzipAthenDep, type: Copy) {
from file(new File(buildDir, '/downloads/unzip/awsathena/SimbaAthenaJDBC-2.0.25.1001/AthenaJDBC42_2.0.25.1001.jar'))
into "src/dist/lib"
}
project.copyPluginLibs.dependsOn('copyAthenDep')
project.compileGroovy.dependsOn('copyAthenDep')

// Hook into the new plugin's build process
compileGroovy.dependsOn('copyAthenDep')

// Configure the packagePlugin task to handle duplicates
tasks.named('packagePlugin') {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
14 changes: 0 additions & 14 deletions buildSrc/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading