Skip to content

Commit

Permalink
refactor: migrate to Java ServiceLoader for plugin registration
Browse files Browse the repository at this point in the history
Update to Java 21
  • Loading branch information
fhussonnois committed Jun 5, 2024
1 parent 11b03af commit 95ed768
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 21

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3
Expand Down
25 changes: 10 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ repositories {
}
}

sourceCompatibility = 17
targetCompatibility = 17
sourceCompatibility = 21
targetCompatibility = 21

group "io.kestra.plugin"
description 'Plugin template for Kestra'
Expand All @@ -37,20 +37,12 @@ dependencies {
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"

// micronaut
annotationProcessor platform("io.micronaut.platform:micronaut-platform:$micronautVersion")
annotationProcessor "io.micronaut:micronaut-inject-java"
annotationProcessor "io.micronaut.validation:micronaut-validation-processor"

compileOnly platform("io.micronaut.platform:micronaut-platform:$micronautVersion")
compileOnly "io.micronaut:micronaut-inject"
compileOnly "io.micronaut.validation:micronaut-validation"
// uncomment if the plugin uses reactive types
// compileOnly "io.micronaut.reactor:micronaut-reactor"
compileOnly "io.micronaut:micronaut-jackson-databind"

// kestra
// Kestra
compileOnly group: "io.kestra", name: "core", version: kestraVersion
annotationProcessor group: "io.kestra", name: "processor", version: kestraVersion

// Logs
compileOnly'org.slf4j:slf4j-api:2.0.13'

// libs included in the final jar
api group: 'com.google.code.gson', name: 'gson', version: '2.11.0'
Expand Down Expand Up @@ -86,6 +78,9 @@ dependencies {
testImplementation platform("io.micronaut.platform:micronaut-platform:$micronautVersion")
testImplementation "io.micronaut.test:micronaut-test-junit5"

// Kestra
testAnnotationProcessor group: "io.kestra", name: "processor", version: kestraVersion

// test deps needed only for to have a runner
testImplementation group: "io.kestra", name: "core", version: kestraVersion
testImplementation group: "io.kestra", name: "repository-memory", version: kestraVersion
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.17.0-SNAPSHOT
kestraVersion=0.16.6
micronautVersion=4.3.4
kestraVersion=[0.17,)
micronautVersion=4.4.1
lombokVersion=1.18.32

0 comments on commit 95ed768

Please sign in to comment.