diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7e0386..4e20744 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: run: env | sort - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4 with: fetch-depth: 1 diff --git a/build.gradle b/build.gradle index 009d913..5b068ab 100644 --- a/build.gradle +++ b/build.gradle @@ -14,8 +14,8 @@ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform plugins { id 'org.cadixdev.licenser' version '0.6.1' id 'org.graalvm.buildtools.native' - id("io.micronaut.application") version "2.0.6" - id 'com.github.johnrengelman.shadow' version '7.1.2' + id("io.micronaut.application") version "4.4.2" + id 'com.github.johnrengelman.shadow' version '8.1.1' } version = project.file('VERSION').text.strip() @@ -52,9 +52,11 @@ dependencies { implementation("javax.annotation:javax.annotation-api") implementation("javax.inject:javax.inject:1") runtimeOnly("ch.qos.logback:logback-classic") + runtimeOnly("org.yaml:snakeyaml") compileOnly("org.graalvm.nativeimage:svm") - implementation("io.micronaut:micronaut-validation") + implementation("io.micronaut.validation:micronaut-validation") + implementation("io.micronaut:micronaut-jackson-databind") testImplementation(platform("org.junit:junit-bom:${junitVersion}")) testImplementation('org.junit.jupiter:junit-jupiter') @@ -91,12 +93,19 @@ task buildInfo { } compileJava { - sourceCompatibility = JavaVersion.toVersion("21") - targetCompatibility = JavaVersion.toVersion("21") + options.release.set(17) + sourceCompatibility = '21' + targetCompatibility = '21' options.compilerArgs += ["-Aproject=${project.name}"] dependsOn buildInfo } +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + shadowJar { archiveBaseName.set('tw-agent') archiveClassifier.set('') @@ -121,15 +130,10 @@ graalvmNative { buildArgs.add('-H:+AddAllCharsets') buildArgs.add('-H:EnableURLProtocols=https,http') buildArgs.add('-H:+ReportExceptionStackTraces') - - javaLauncher = javaToolchains.launcherFor { - languageVersion = JavaLanguageVersion.of(17) - } } test { verbose = true - agent = true } } } diff --git a/gradle.properties b/gradle.properties index f0c8a05..7db6353 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -micronautVersion=3.1.0 -native.gradle.plugin.version = 0.9.6 +micronautVersion=4.7.1 +native.gradle.plugin.version = 0.10.4 junit.jupiter.version = 5.8.1 junit.platform.version = 1.8.1 diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 0ce0775..fc7aa8c 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -18,7 +18,6 @@ - true %cyan(%d{HH:mm:ss.SSS}) %highlight(%-5level)- %msg%n