Skip to content

Commit

Permalink
Update to Micronaut 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasschaefer committed Jul 20, 2023
1 parent f80d5a6 commit aeab643
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 37 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['8', '11', '17'] #Support LTS releases 8, 11 and 17 and the latest release supported by Micronaut.
java: ['17'] #Support LTS releases 17 and the latest release supported by Micronaut.
runtime: ['netty']
include: # Test more server runtimes on Java 8 only (to reduce number of combinations)
- java: '8'
include: # Test more server runtimes on Java 17 only (to reduce number of combinations)
- java: '17'
runtime: 'jetty'
- java: '8'
- java: '17'
runtime: 'tomcat'
- java: '8'
- java: '17'
runtime: 'undertow'

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-all-combinations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['8', '11', '17'] #Support LTS releases 8, 11, and 17 and the latest release supported by Micronaut.
java: ['17'] #Support LTS releases 17 and the latest release supported by Micronaut.
runtime: ['netty', 'jetty', 'tomcat', 'undertow']

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
java-version: '17'

- name: Extract secring.gpg to sign files
run: echo -n $SECRING_GPG | base64 --decode > micronaut-camunda-bpm-feature/secring.gpg
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ Here are some example applications:

## Supported JDKs

We officially support the following JDKs:
The current releases are built with Micronaut 4 and therefore we officially support the following JDKs:
* JDK 17 (LTS)

The lastest release supporting Micronaut 3 is 2.15.0 which supports the following JDKs:
* JDK 8 (LTS)
* JDK 11 (LTS)
* JDK 17 (LTS)
Expand Down
19 changes: 10 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# The project property 'version' is overwritten via .github/workflows/publish-release.yml
version=0.0.1-SNAPSHOT
kotlinVersion=1.6.21
micronautVersion=3.9.4
micronautApplicationPluginVersion=3.7.10
micronautLibraryPluginVersion=3.7.10
# The matching versions can be found here: https://github.com/micronaut-projects/micronaut-servlet/blob/v3.3.5/gradle/libs.versions.toml
jettyVersion=9.4.49.v20220914
tomcatVersion=9.0.65
undertowVersion=2.2.18.Final
javaLanguageVersion=17
kotlinVersion=1.8.22
micronautVersion=4.0.0
micronautApplicationPluginVersion=4.0.0
micronautLibraryPluginVersion=4.0.0
# The matching versions can be found here: https://github.com/micronaut-projects/micronaut-servlet/blob/v4.0.0/gradle/libs.versions.toml
jettyVersion=11.0.15
tomcatVersion=10.1.11
undertowVersion=2.3.7.Final
camundaVersion=7.19.0
# Latest Jersey, that implements JAX-RS 2.1 API: see https://eclipse-ee4j.github.io/jersey/download.html
jerseyVersion=2.39.1
jerseyVersion=2.40
# Prevent upload of maven-metadata.xml.sha256/sha512 files to oss.sonatype.org
# see https://issues.sonatype.org/browse/OSSRH-53695?focusedCommentId=887733&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-887733
# see https://github.com/gradle/gradle/issues/11308#issuecomment-554317655
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
# -bin.zip is used for size/caching reasons, -all.zip is bigger and therefore not used
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 3 additions & 2 deletions micronaut-camunda-bpm-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies {
implementation(project(":micronaut-camunda-bpm-feature"))
runtimeOnly("com.h2database:h2")
runtimeOnly("ch.qos.logback:logback-classic")
runtimeOnly("org.yaml:snakeyaml")

// Test
testImplementation("io.micronaut:micronaut-http-client")
Expand All @@ -30,8 +31,8 @@ application {
}

java {
sourceCompatibility = JavaVersion.toVersion("1.8")
targetCompatibility = JavaVersion.toVersion("1.8")
sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion)
targetCompatibility = JavaVersion.toVersion(javaLanguageVersion)
}

dockerfile {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>false</withJansi>
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
Expand Down
12 changes: 7 additions & 5 deletions micronaut-camunda-bpm-feature/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ micronaut {
}

dependencies {
implementation("io.micronaut:micronaut-validation")
annotationProcessor("io.micronaut.validation:micronaut-validation-processor")
implementation("io.micronaut.validation:micronaut-validation")
implementation("io.micronaut:micronaut-runtime")
implementation("com.fasterxml.uuid:java-uuid-generator:4.2.0")
api("org.camunda.bpm:camunda-engine:$camundaVersion") {
Expand All @@ -36,7 +37,7 @@ dependencies {
compileOnly("org.apache.tomcat.embed:tomcat-embed-core:$tomcatVersion")
compileOnly("io.undertow:undertow-core:$undertowVersion")

kaptTest platform("io.micronaut:micronaut-bom:$micronautVersion")
kaptTest(platform("io.micronaut.platform:micronaut-platform:$micronautVersion"))
kaptTest("io.micronaut.data:micronaut-data-processor")
kapt("io.micronaut:micronaut-inject-java:$micronautVersion")

Expand All @@ -63,11 +64,12 @@ dependencies {
testRuntimeOnly("com.h2database:h2")
testRuntimeOnly("io.micronaut:micronaut-http-server-netty")
testRuntimeOnly("org.codehaus.groovy:groovy-all:3.0.18") // as script engine
testRuntimeOnly("org.yaml:snakeyaml")
}

java {
sourceCompatibility = JavaVersion.toVersion('1.8')
targetCompatibility = JavaVersion.toVersion('1.8')
sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion)
targetCompatibility = JavaVersion.toVersion(javaLanguageVersion)
withJavadocJar()
withSourcesJar()
}
Expand All @@ -79,7 +81,7 @@ test {
tasks {
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = javaLanguageVersion
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ dependencies {
testImplementation(project(":micronaut-camunda-bpm-feature"))
testRuntimeOnly("com.h2database:h2")
testRuntimeOnly("ch.qos.logback:logback-classic")
testRuntimeOnly("org.yaml:snakeyaml")

kaptTest(platform("io.micronaut:micronaut-bom:$micronautVersion"))
kaptTest(platform("io.micronaut.platform:micronaut-platform:$micronautVersion"))
kaptTest("io.micronaut.data:micronaut-data-processor")
kaptTest("io.micronaut:micronaut-inject-java:$micronautVersion")

Expand All @@ -36,13 +37,13 @@ application {
}

java {
sourceCompatibility = JavaVersion.toVersion("1.8")
sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion)
}

tasks {
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = javaLanguageVersion
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.DispatcherType;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.util.EnumSet;

import static info.novatec.micronaut.camunda.bpm.feature.Configuration.Rest.DEFAULT_AUTHENTICATION_PROVIDER;
import static javax.servlet.DispatcherType.REQUEST;

/**
* Using Micronaut Servlet with Jetty to run the REST API/Webapps as a servlet.
Expand Down Expand Up @@ -88,7 +88,7 @@ public void contextDestroyed(ServletContextEvent sce) {
// see https://docs.camunda.org/manual/latest/reference/rest/overview/authentication/
FilterHolder filterHolder = new FilterHolder(ProcessEngineAuthenticationFilter.class);
filterHolder.setInitParameter("authentication-provider", authenticationProvider);
restServletContextHandler.addFilter(filterHolder, "/*", EnumSet.of(REQUEST));
restServletContextHandler.addFilter(filterHolder, "/*", EnumSet.of(DispatcherType.REQUEST));
log.debug("REST API - Authentication enabled with authentication-provider {}", authenticationProvider);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import java.util.Map;

import static java.util.Collections.singletonMap;
import static javax.servlet.DispatcherType.REQUEST;

/**
* Using Micronaut Servlet with Jetty to run the REST API/Webapps as a servlet.
Expand Down Expand Up @@ -171,7 +170,7 @@ public void execute() throws Exception {
static class ServletContextInitializedListener implements ServletContextListener {
private static final Logger log = LoggerFactory.getLogger(ServletContextInitializedListener.class);

protected static final EnumSet<DispatcherType> DISPATCHER_TYPES = EnumSet.of(REQUEST);
protected static final EnumSet<DispatcherType> DISPATCHER_TYPES = EnumSet.of(DispatcherType.REQUEST);

protected static ServletContext servletContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
testImplementation(project(":micronaut-camunda-bpm-feature").sourceSets.test.output)
testRuntimeOnly("com.h2database:h2")

kaptTest(platform("io.micronaut:micronaut-bom:$micronautVersion"))
kaptTest(platform("io.micronaut.platform:micronaut-platform:$micronautVersion"))
kaptTest("io.micronaut.data:micronaut-data-processor")
kaptTest("io.micronaut:micronaut-inject-java:$micronautVersion")

Expand All @@ -28,13 +28,13 @@ dependencies {
}

java {
sourceCompatibility = JavaVersion.toVersion("1.8")
sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion)
}

tasks {
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = javaLanguageVersion
}
}
}

0 comments on commit aeab643

Please sign in to comment.