Skip to content

Commit 42625ff

Browse files
authored
Merge pull request #63 from cryptomator/feature/jdk22
Build project with JDK 22
2 parents 4db325b + 50c34ad commit 42625ff

File tree

8 files changed

+50
-8
lines changed

8 files changed

+50
-8
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
fetch-depth: 0
1212
- uses: actions/setup-java@v4
1313
with:
14-
java-version: 21
14+
java-version: 22
1515
distribution: 'temurin'
1616
cache: 'maven'
1717
- name: Cache SonarCloud packages

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fetch-depth: 2
2020
- uses: actions/setup-java@v4
2121
with:
22-
java-version: 21
22+
java-version: 22
2323
distribution: 'temurin'
2424
cache: 'maven'
2525
- name: Initialize CodeQL

.github/workflows/dependency-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
runner-os: 'ubuntu-latest'
1616
java-distribution: 'temurin'
17-
java-version: 21
17+
java-version: 22
1818
secrets:
1919
nvd-api-key: ${{ secrets.NVD_API_KEY }}
2020
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}

.github/workflows/publish-central.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
ref: "refs/tags/${{ github.event.inputs.tag }}"
1616
- uses: actions/setup-java@v4
1717
with:
18-
java-version: 21
18+
java-version: 22
1919
distribution: 'temurin'
2020
cache: 'maven'
2121
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml

.github/workflows/publish-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v4
1111
- uses: actions/setup-java@v4
1212
with:
13-
java-version: 21
13+
java-version: 22
1414
distribution: 'temurin'
1515
cache: 'maven'
1616
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@
141141
<configuration>
142142
<rules>
143143
<requireJavaVersion>
144-
<message>You need at least JDK 11.0.3 to build this project.</message>
145-
<version>[11.0.3,)</version>
144+
<message>You need at least JDK 22 to build this project.</message>
145+
<version>[22,)</version>
146146
</requireJavaVersion>
147147
</rules>
148148
</configuration>
@@ -171,6 +171,20 @@
171171
<multiReleaseOutput>true</multiReleaseOutput>
172172
</configuration>
173173
</execution>
174+
<execution>
175+
<id>java22</id>
176+
<phase>compile</phase>
177+
<goals>
178+
<goal>compile</goal>
179+
</goals>
180+
<configuration>
181+
<release>22</release>
182+
<compileSourceRoots>
183+
<compileSourceRoot>${project.basedir}/src/main/java22</compileSourceRoot>
184+
</compileSourceRoots>
185+
<multiReleaseOutput>true</multiReleaseOutput>
186+
</configuration>
187+
</execution>
174188
</executions>
175189
</plugin>
176190
<plugin>
@@ -228,6 +242,7 @@
228242
<argument>--update</argument>
229243
<argument>--file=${project.build.directory}/${project.build.finalName}.jar</argument>
230244
<argument>META-INF/versions/9/module-info.class</argument>
245+
<argument>META-INF/versions/22/module-info.class</argument>
231246
</arguments>
232247
</configuration>
233248
</execution>

src/main/java22/module-info.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import org.cryptomator.cryptolib.api.CryptorProvider;
2+
3+
/**
4+
* This module provides the highlevel cryptographic API used by Cryptomator.
5+
*
6+
* @uses CryptorProvider See {@link CryptorProvider#forScheme(CryptorProvider.Scheme)}
7+
* @provides CryptorProvider Providers for {@link org.cryptomator.cryptolib.api.CryptorProvider.Scheme#SIV_CTRMAC SIV/CTR-then-MAC}
8+
* and {@link org.cryptomator.cryptolib.api.CryptorProvider.Scheme#SIV_GCM SIV/GCM}
9+
*/
10+
module org.cryptomator.cryptolib {
11+
requires static org.bouncycastle.provider; // will be shaded
12+
requires static org.bouncycastle.pkix; // will be shaded
13+
requires org.cryptomator.siv;
14+
requires com.google.gson;
15+
requires transitive com.google.common;
16+
requires org.slf4j;
17+
18+
exports org.cryptomator.cryptolib.api;
19+
exports org.cryptomator.cryptolib.common;
20+
21+
opens org.cryptomator.cryptolib.common to com.google.gson;
22+
23+
uses CryptorProvider;
24+
25+
provides CryptorProvider
26+
with org.cryptomator.cryptolib.v1.CryptorProviderImpl, org.cryptomator.cryptolib.v2.CryptorProviderImpl;
27+
}

0 commit comments

Comments
 (0)