Skip to content

Commit d8259b1

Browse files
committed
Update build convention and make file
Signed-off-by: Paolo Di Tommaso <[email protected]>
1 parent 4a4ac28 commit d8259b1

File tree

8 files changed

+82
-22
lines changed

8 files changed

+82
-22
lines changed

Makefile

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,71 @@
1+
config ?= compileClasspath
2+
3+
ifdef module
4+
mm = :${module}:
5+
else
6+
mm =
7+
endif
8+
9+
clean:
10+
rm -rf .nextflow*
11+
rm -rf work
12+
rm -rf build
13+
rm -rf plugins/*/build
14+
./gradlew clean
15+
16+
compile:
17+
./gradlew compileGroovy
18+
@echo "DONE `date`"
19+
20+
21+
check:
22+
./gradlew check
23+
24+
125
#
226
# Show dependencies try `make deps config=runtime`, `make deps config=google`
327
#
4-
deps: FORCE
5-
./gradlew -q :plugins:nf-sqldb:dependencies --configuration runtimeClasspath
28+
deps:
29+
./gradlew -q ${mm}dependencies --configuration ${config}
30+
31+
deps-all:
32+
./gradlew -q dependencyInsight --configuration ${config} --dependency ${module}
33+
34+
#
35+
# Refresh SNAPSHOTs dependencies
36+
#
37+
refresh:
38+
./gradlew --refresh-dependencies
39+
40+
#
41+
# Run all tests or selected ones
42+
#
43+
test:
44+
ifndef class
45+
./gradlew ${mm}test
46+
else
47+
./gradlew ${mm}test --tests ${class}
48+
endif
49+
50+
assemble:
51+
./gradlew assemble
52+
53+
#
54+
# generate build zips under build/plugins
55+
# you can install the plugin copying manually these files to $HOME/.nextflow/plugins
56+
#
57+
buildPlugins:
58+
./gradlew copyPluginZip
59+
60+
#
61+
# Upload JAR artifacts to Maven Central
62+
#
63+
upload:
64+
./gradlew upload
65+
66+
67+
upload-plugins:
68+
./gradlew plugins:upload
669

7-
FORCE: ;
70+
publish-index:
71+
./gradlew plugins:publishIndex

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ The following databases are currently supported:
66

77
* [AWS Athena](https://aws.amazon.com/athena/) (Setup guide [here](docs/aws-athena.md))
88
* [DuckDB](https://duckdb.org/)
9-
* [Google BigQuery](https://cloud.google.com/bigquery) (Setup guide [here](docs/google-bigquery.md))
109
* [H2](https://www.h2database.com)
1110
* [MySQL](https://www.mysql.com/)
1211
* [MariaDB](https://mariadb.org/)
@@ -25,13 +24,6 @@ plugins {
2524
}
2625
```
2726

28-
Support for BigQuery is provided in a separate plugin:
29-
30-
```groovy
31-
plugins {
32-
id 'nf-bigquery'
33-
}
34-
```
3527

3628
## Configuration
3729

buildSrc/src/main/groovy/io.nextflow.groovy-common-conventions.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ repositories {
1414

1515
java {
1616
toolchain {
17-
languageVersion = JavaLanguageVersion.of(19)
17+
languageVersion = JavaLanguageVersion.of(21)
1818
}
1919
}
2020

2121
compileJava {
22-
options.release.set(11)
22+
options.release.set(17)
2323
}
2424

2525
tasks.withType(GroovyCompile) {
26-
sourceCompatibility = '11'
27-
targetCompatibility = '11'
26+
sourceCompatibility = 17
27+
targetCompatibility = 17
2828
}
2929

3030
tasks.withType(Test) {

plugins/nf-sqldb/src/main/nextflow/sql/SqlPlugin.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package nextflow.sql
1919

20+
import groovy.transform.CompileStatic
2021
import nextflow.plugin.BasePlugin
2122
import org.pf4j.PluginWrapper
2223

@@ -25,6 +26,7 @@ import org.pf4j.PluginWrapper
2526
*
2627
* @author Paolo Di Tommaso <[email protected]>
2728
*/
29+
@CompileStatic
2830
class SqlPlugin extends BasePlugin {
2931

3032
SqlPlugin(PluginWrapper wrapper) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Plugin-Class: nextflow.sql.SqlPlugin
33
Plugin-Id: nf-sqldb
44
Plugin-Provider: Seqera Labs
55
Plugin-Version: 0.6.0
6-
Plugin-Requires: >=24.01.0-edge
6+
Plugin-Requires: >=24.04.0

plugins/nf-sqldb/src/test/nextflow/sql/SqlDslTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import spock.lang.Requires
3232
import spock.lang.Shared
3333
import spock.lang.Timeout
3434
import test.Dsl2Spec
35-
import test.MockScriptRunner
35+
import test.helpers.MockScriptRunner
3636

3737
import java.nio.file.Path
3838

plugins/nf-sqldb/src/test/test/MockHelpers.groovy renamed to plugins/nf-sqldb/src/test/test/helpers/MockHelpers.groovy

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*/
1717

18-
package test
18+
package test.helpers
1919

2020
import java.nio.file.Paths
2121

@@ -147,13 +147,13 @@ class MockMonitor implements TaskMonitor {
147147
*
148148
* @param handler A not null {@code TaskHandler} instance
149149
*/
150-
boolean evict(TaskHandler handler) { }
150+
boolean evict(TaskHandler handler) { return null }
151151

152152
/**
153153
* Start the monitoring activity for the queued tasks
154154
* @return The instance itself, useful to chain methods invocation
155155
*/
156-
TaskMonitor start() { }
156+
TaskMonitor start() { return null }
157157

158158
/**
159159
* Notify when a task terminates
@@ -190,9 +190,11 @@ class MockTaskHandler extends TaskHandler {
190190

191191
@Override
192192
boolean checkIfCompleted() {
193-
true
193+
return true
194194
}
195195

196+
protected void killTask() { }
197+
196198
@Override
197199
void kill() { }
198200

plugins/nf-sqldb/src/test/test/TestHelper.groovy renamed to plugins/nf-sqldb/src/test/test/helpers/TestHelper.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*/
1717

18-
package test
18+
package test.helpers
1919
import java.nio.file.Files
2020
import java.nio.file.Path
2121
import java.util.zip.GZIPInputStream

0 commit comments

Comments
 (0)