Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use Kestra Platform #53

Merged
merged 3 commits into from
Jul 17, 2024
Merged
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
57 changes: 33 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,25 @@ tasks.withType(JavaCompile) {
}

dependencies {
// Platform
annotationProcessor enforcedPlatform("io.kestra:platform:$kestraVersion")
implementation enforcedPlatform("io.kestra:platform:$kestraVersion")
api enforcedPlatform("io.kestra:platform:$kestraVersion")

// lombok
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok"
compileOnly "org.projectlombok:lombok"

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

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

// libs included in the final jar
api group: 'com.google.code.gson', name: 'gson', version: '2.11.0'
// TODO remove it after using the GitHub template as your plugin may not need it
api "com.google.code.gson:gson:2.11.0"
}


Expand All @@ -68,41 +73,40 @@ testlogger {
}

dependencies {
// Platform
testAnnotationProcessor enforcedPlatform("io.kestra:platform:$kestraVersion")
testImplementation enforcedPlatform("io.kestra:platform:$kestraVersion")

// lombok
testAnnotationProcessor "org.projectlombok:lombok:" + lombokVersion
testCompileOnly 'org.projectlombok:lombok:' + lombokVersion
testAnnotationProcessor "org.projectlombok:lombok"
testCompileOnly "org.projectlombok:lombok"

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

testImplementation platform("io.micronaut.platform:micronaut-platform:$micronautVersion")
testImplementation "io.micronaut.test:micronaut-test-junit5"
testImplementation "io.micronaut:micronaut-jackson-databind"

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

// test deps needed only for to have a runner
testAnnotationProcessor group: "io.kestra", name: "processor", version: kestraVersion
testImplementation group: "io.kestra", name: "core", version: kestraVersion
testImplementation group: "io.kestra", name: "tests", version: kestraVersion
testImplementation group: "io.kestra", name: "repository-memory", version: kestraVersion
testImplementation group: "io.kestra", name: "runner-memory", version: kestraVersion
testImplementation group: "io.kestra", name: "storage-local", version: kestraVersion
testAnnotationProcessor "io.kestra:processor"
testImplementation "io.kestra:core"
testImplementation "io.kestra:tests"
// Kestra deps needed only to have a runner for unit tests
testImplementation "io.kestra:repository-memory"
testImplementation "io.kestra:runner-memory"
testImplementation "io.kestra:storage-local"

// test
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.hamcrest:hamcrest:2.2"
testImplementation "org.hamcrest:hamcrest-library:2.2"
testImplementation "org.hamcrest:hamcrest"
testImplementation "org.hamcrest:hamcrest-library"
}

/**********************************************************************************************************************\
* Allure Reports
**********************************************************************************************************************/
dependencies {
testImplementation platform("io.qameta.allure:allure-bom:2.27.0")
testImplementation enforcedPlatform("io.kestra:platform:$kestraVersion")
testImplementation "io.qameta.allure:allure-junit5"
}

Expand Down Expand Up @@ -146,6 +150,11 @@ nexusPublishing {
}
}

tasks.withType(GenerateModuleMetadata).configureEach {
// Suppression this validation error as we want to enforce the Kestra platform
suppressedValidationErrors.add('enforced-platform')
}

jar {
manifest {
attributes(
Expand Down
6 changes: 2 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
version=0.17.0-SNAPSHOT
kestraVersion=[0.17,)
micronautVersion=4.4.1
lombokVersion=1.18.32
version=0.18.0-SNAPSHOT
kestraVersion=[0.18,)
20 changes: 4 additions & 16 deletions src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<property name="pattern" value="%d{ISO8601} %highlight(%-5.5level) %magenta(%-12.12thread) %cyan(%-12.12logger{12}) %msg%n" />
<withJansi>true</withJansi>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<target>System.out</target>
<immediateFlush>true</immediateFlush>
<encoder>
<pattern>${pattern}</pattern>
</encoder>
</appender>

<include resource="logback/base.xml" />
<include resource="logback/text.xml" />
<include resource="logback/test.xml" />

<root level="WARN">
<appender-ref ref="STDOUT" />
<appender-ref ref="STDERR" />
</root>

<logger name="io.kestra" level="INFO" />
<logger name="flow" level="INFO" />

</configuration>