Skip to content

Commit 5800c66

Browse files
pditommasoclaude
andcommitted
Add buildSrc configuration to resolve custom Gradle plugins
- Create buildSrc/build.gradle to enable custom convention plugins - Add missing build configuration for groovy-gradle-plugin - Resolves issue with io.seqera.groovy-library-conventions plugin not found - Build now works with custom Seqera convention plugins 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent c2d7e7e commit 5800c66

7 files changed

+150
-0
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id 'io.nextflow.nextflow-plugin' version '1.0.0-beta.9'
3+
id 'io.seqera.groovy-library-conventions'
34
}
45

56
version = '0.2.0'

buildSrc/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
plugins {
2+
id 'groovy-gradle-plugin'
3+
}
4+
5+
repositories {
6+
gradlePluginPortal()
7+
mavenCentral()
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*/
4+
5+
plugins {
6+
// Apply the common convention plugin for shared build configuration between library and application projects.
7+
id 'io.seqera.java-common-conventions'
8+
id 'groovy'
9+
// Apply the application plugin to add support for building a CLI application in Java.
10+
id 'application'
11+
12+
}
13+
14+
group = 'io.seqera'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*/
4+
5+
plugins {
6+
// Apply the common convention plugin for shared build configuration between library and application projects.
7+
id 'io.seqera.java-common-conventions'
8+
id 'groovy'
9+
// Apply the java-library plugin for API and implementation separation.
10+
id 'java-library'
11+
}
12+
13+
dependencies {
14+
implementation "org.apache.groovy:groovy:4.0.24"
15+
}
16+
17+
group = 'io.seqera'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*/
4+
5+
plugins {
6+
// Apply the common convention plugin for shared build configuration between library and application projects.
7+
id 'io.seqera.java-common-conventions'
8+
// Apply the application plugin to add support for building a CLI application in Java.
9+
id 'application'
10+
}
11+
12+
group = 'io.seqera'
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*/
4+
5+
plugins {
6+
// Apply the groovy Plugin to add support for Groovy.
7+
id 'java'
8+
}
9+
10+
repositories {
11+
mavenCentral()
12+
maven { url = 'https://s3-eu-west-1.amazonaws.com/maven.seqera.io/releases' }
13+
maven { url = 'https://s3-eu-west-1.amazonaws.com/maven.seqera.io/snapshots' }
14+
}
15+
16+
java {
17+
// these settings apply to all jvm tooling, including groovy
18+
toolchain {
19+
languageVersion = JavaLanguageVersion.of(21)
20+
}
21+
sourceCompatibility = 17
22+
targetCompatibility = 17
23+
}
24+
25+
group = 'io.seqera'
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*/
4+
5+
plugins {
6+
// Apply the groovy Plugin to add support for Groovy.
7+
id 'io.seqera.java-common-conventions'
8+
id 'java-library'
9+
id 'maven-publish'
10+
}
11+
12+
test {
13+
useJUnitPlatform()
14+
}
15+
16+
group = 'io.seqera'
17+
18+
java {
19+
withSourcesJar()
20+
}
21+
22+
dependencies {
23+
implementation 'org.slf4j:slf4j-api:2.0.16'
24+
25+
testImplementation 'ch.qos.logback:logback-core:1.5.15'
26+
testImplementation 'ch.qos.logback:logback-classic:1.5.15'
27+
testImplementation "org.apache.groovy:groovy:4.0.24"
28+
testImplementation "org.apache.groovy:groovy-nio:4.0.24"
29+
testImplementation ("org.apache.groovy:groovy-test:4.0.24")
30+
testImplementation ("cglib:cglib-nodep:3.3.0")
31+
testImplementation ("org.objenesis:objenesis:3.4")
32+
testImplementation ("org.spockframework:spock-core:2.3-groovy-4.0")
33+
testImplementation ('org.spockframework:spock-junit4:2.3-groovy-4.0')
34+
}
35+
36+
tasks.withType(Test) {
37+
jvmArgs ([
38+
'--add-opens=java.base/java.lang=ALL-UNNAMED',
39+
'--add-opens=java.base/java.io=ALL-UNNAMED',
40+
'--add-opens=java.base/java.nio=ALL-UNNAMED',
41+
'--add-opens=java.base/java.nio.file.spi=ALL-UNNAMED',
42+
'--add-opens=java.base/java.net=ALL-UNNAMED',
43+
'--add-opens=java.base/java.util=ALL-UNNAMED',
44+
'--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED',
45+
'--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED',
46+
'--add-opens=java.base/sun.nio.ch=ALL-UNNAMED',
47+
'--add-opens=java.base/sun.nio.fs=ALL-UNNAMED',
48+
'--add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED',
49+
'--add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED',
50+
'--add-opens=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED',
51+
'--add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED',
52+
'--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED',
53+
'--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED',
54+
])
55+
}
56+
57+
publishing {
58+
repositories {
59+
maven {
60+
name = "Seqera"
61+
url = project.findProperty('publish_repo_url') ?: System.getenv('PUBLISH_REPO_URL') ?: "s3://maven.seqera.io/snapshots"
62+
credentials(AwsCredentials) {
63+
accessKey = project.findProperty('aws_access_key_id') ?: System.getenv('AWS_ACCESS_KEY_ID')
64+
secretKey = project.findProperty('aws_secret_access_key') ?: System.getenv('AWS_SECRET_ACCESS_KEY')
65+
}
66+
}
67+
}
68+
publications {
69+
maven(MavenPublication) {
70+
from(components.java)
71+
}
72+
}
73+
}

0 commit comments

Comments
 (0)