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

Upgrade to Java 17 #1673

Merged
merged 27 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
8 changes: 4 additions & 4 deletions .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Set up JDK 11
uses: actions/setup-java@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
java-version: 17
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run check style
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 11
uses: actions/setup-java@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
java-version: 17
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
fetch-depth: 0
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'
- name: 'Previous version'
if: github.ref == 'refs/heads/master'
id: 'previous-version'
Expand Down
46 changes: 31 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ allprojects {
group = 'pl.allegro.tech.hermes'
version = scmVersion.version

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

project.ext.versions = [
kafka : '2.8.2',
Expand All @@ -57,8 +57,8 @@ allprojects {
dropwizard_metrics: '4.1.0',
micrometer_metrics: '1.2.1',
wiremock : '2.27.2',
spock : '1.3-groovy-2.5',
groovy : '2.5.16',
spock : '2.4-M1-groovy-4.0',
groovy : '4.0.12',
alpn_api : '1.1.2.v20150522',
avro : '1.9.1',
json2avro : '0.2.14',
Expand All @@ -67,7 +67,7 @@ allprojects {
spring_web : '5.1.5.RELEASE',
failsafe : '2.3.1',
junit_jupiter : '5.8.2',
testcontainers : '1.15.3', // versions above require groovy 3.0
testcontainers : '1.18.1',
spring : '2.4.2',
assertj : '3.22.0'
]
Expand All @@ -77,27 +77,43 @@ allprojects {
}

dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.12'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.12'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'

testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile group: 'com.tngtech.java', name: 'junit-dataprovider', version: '1.10.0'
testCompile group: 'pl.pragmatists', name: 'JUnitParams', version: '1.0.2'
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
testCompile group: 'org.assertj', name: 'assertj-core', version: versions.assertj
testCompile group: 'com.jayway.awaitility', name: 'awaitility', version: '1.6.1'
testCompile group: 'com.googlecode.catch-exception', name: 'catch-exception', version: '1.2.0'
testImplementation group: 'junit', name: 'junit', version: '4.11'
testImplementation group: 'com.tngtech.java', name: 'junit-dataprovider', version: '1.10.0'
testImplementation group: 'pl.pragmatists', name: 'JUnitParams', version: '1.0.2'
testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.9.5'
testImplementation group: 'org.assertj', name: 'assertj-core', version: versions.assertj
testImplementation group: 'com.jayway.awaitility', name: 'awaitility', version: '1.6.1'
testImplementation group: 'com.googlecode.catch-exception', name: 'catch-exception', version: '1.2.0'

annotationProcessor group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: versions.spring
}

// https://chronicle.software/chronicle-support-java-17/
ext.chronicleMapJvmArgs = ["--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED",
"--add-exports=java.base/sun.nio.ch=ALL-UNNAMED",
"--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
"--add-opens=java.base/java.io=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED"]

test {
useJUnitPlatform()
def args = []
if (project.hasProperty('tests.timeout.multiplier')) {
jvmArgs = ["-Dtests.timeout.multiplier=${project.property('tests.timeout.multiplier')}"]
args = ["-Dtests.timeout.multiplier=${project.property('tests.timeout.multiplier')}"]
}
args += chronicleMapJvmArgs
jvmArgs = args
}
}


configure(subprojects - project(':integration')) {
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=1024m
org.gradle.jvmargs=-Xmx2g
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading