Skip to content

Commit 00ebdcc

Browse files
Merge branch 'main' into develop
2 parents e32836d + 1e26e37 commit 00ebdcc

File tree

78 files changed

+863
-988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+863
-988
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v2
1111
- uses: actions/setup-java@v1
1212
with:
13-
java-version: 11
13+
java-version: 16
1414
- uses: actions/cache@v2
1515
with:
1616
path: ~/.m2/repository

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fetch-depth: 2
2121
- uses: actions/setup-java@v1
2222
with:
23-
java-version: 11
23+
java-version: 16
2424
- uses: actions/cache@v2
2525
with:
2626
path: ~/.m2/repository

.github/workflows/publish-central.yml

Lines changed: 6 additions & 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@v1
1717
with:
18-
java-version: 11
18+
java-version: 16
1919
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
2020
server-username: MAVEN_USERNAME # env variable for username in deploy
2121
server-password: MAVEN_PASSWORD # env variable for token in deploy
@@ -32,6 +32,11 @@ jobs:
3232
- name: Deploy
3333
run: mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
3434
env:
35+
MAVEN_OPTS: >
36+
--add-opens=java.base/java.util=ALL-UNNAMED
37+
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
38+
--add-opens=java.base/java.text=ALL-UNNAMED
39+
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED
3540
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3641
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
3742
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}

.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@v2
1111
- uses: actions/setup-java@v1
1212
with:
13-
java-version: 11
13+
java-version: 16
1414
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
1515
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
1616
- uses: actions/cache@v2

.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.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ For more details on how to use the constructed `FileSystem`, you may consult the
9393

9494
### Dependencies
9595

96-
* Java 11
96+
* Java 16 (will be updated to 17 in late 2021)
9797
* Maven 3
9898

9999
### Run Maven

pom.xml

Lines changed: 20 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>org.cryptomator</groupId>
44
<artifactId>cryptofs</artifactId>
5-
<version>2.0.0-SNAPSHOT</version>
5+
<version>2.1.0-SNAPSHOT</version>
66
<name>Cryptomator Crypto Filesystem</name>
77
<description>This library provides the Java filesystem provider used by Cryptomator.</description>
88
<url>https://github.com/cryptomator/cryptofs</url>
@@ -15,18 +15,24 @@
1515

1616
<properties>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18+
<maven.compiler.release>16</maven.compiler.release>
1819

1920
<!-- dependencies -->
20-
<cryptolib.version>2.0.0-beta2</cryptolib.version>
21-
<jwt.version>3.12.0</jwt.version>
22-
<dagger.version>2.31</dagger.version>
23-
<guava.version>30.1-jre</guava.version>
24-
<slf4j.version>1.7.30</slf4j.version>
21+
<cryptolib.version>2.0.0</cryptolib.version>
22+
<jwt.version>3.18.1</jwt.version>
23+
<dagger.version>2.37</dagger.version>
24+
<guava.version>30.1.1-jre</guava.version>
25+
<slf4j.version>1.7.31</slf4j.version>
2526

2627
<!-- test dependencies -->
27-
<junit.jupiter.version>5.7.0</junit.jupiter.version>
28-
<mockito.version>3.7.7</mockito.version>
28+
<junit.jupiter.version>5.7.2</junit.jupiter.version>
29+
<mockito.version>3.11.2</mockito.version>
2930
<hamcrest.version>2.2</hamcrest.version>
31+
32+
<!-- build plugin dependencies -->
33+
<dependency-check.version>6.2.2</dependency-check.version>
34+
<jacoco.version>0.8.7</jacoco.version>
35+
<nexus-staging.version>1.6.8</nexus-staging.version>
3036
</properties>
3137

3238
<licenses>
@@ -116,33 +122,11 @@
116122

117123
<build>
118124
<plugins>
119-
<plugin>
120-
<groupId>org.apache.maven.plugins</groupId>
121-
<artifactId>maven-enforcer-plugin</artifactId>
122-
<version>3.0.0-M3</version>
123-
<executions>
124-
<execution>
125-
<id>enforce-java</id>
126-
<goals>
127-
<goal>enforce</goal>
128-
</goals>
129-
<configuration>
130-
<rules>
131-
<requireJavaVersion>
132-
<message>You need at least JDK 11.0.3 to build this project.</message>
133-
<version>[11.0.3,)</version>
134-
</requireJavaVersion>
135-
</rules>
136-
</configuration>
137-
</execution>
138-
</executions>
139-
</plugin>
140125
<plugin>
141126
<groupId>org.apache.maven.plugins</groupId>
142127
<artifactId>maven-compiler-plugin</artifactId>
143128
<version>3.8.1</version>
144129
<configuration>
145-
<release>8</release>
146130
<showWarnings>true</showWarnings>
147131
<annotationProcessorPaths>
148132
<path>
@@ -156,19 +140,12 @@
156140
<plugin>
157141
<groupId>org.apache.maven.plugins</groupId>
158142
<artifactId>maven-surefire-plugin</artifactId>
159-
<version>2.22.2</version>
143+
<version>3.0.0-M5</version>
160144
</plugin>
161145
<plugin>
162146
<groupId>org.apache.maven.plugins</groupId>
163147
<artifactId>maven-jar-plugin</artifactId>
164148
<version>3.2.0</version>
165-
<configuration>
166-
<archive>
167-
<manifestEntries>
168-
<Automatic-Module-Name>org.cryptomator.cryptofs</Automatic-Module-Name>
169-
</manifestEntries>
170-
</archive>
171-
</configuration>
172149
</plugin>
173150
<plugin>
174151
<artifactId>maven-source-plugin</artifactId>
@@ -184,7 +161,7 @@
184161
</plugin>
185162
<plugin>
186163
<artifactId>maven-javadoc-plugin</artifactId>
187-
<version>3.2.0</version>
164+
<version>3.3.0</version>
188165
<executions>
189166
<execution>
190167
<id>attach-javadocs</id>
@@ -219,14 +196,6 @@
219196
<tag><name>serialData</name></tag>
220197
<tag><name>see</name></tag>
221198
</tags>
222-
<!-- Used for javax.annotation.Generated in dagger-generated code. Can be removed when using JDK 11+ -->
223-
<additionalDependencies>
224-
<additionalDependency>
225-
<groupId>javax.annotation</groupId>
226-
<artifactId>jsr250-api</artifactId>
227-
<version>1.0</version>
228-
</additionalDependency>
229-
</additionalDependencies>
230199
</configuration>
231200
</plugin>
232201
</plugins>
@@ -240,7 +209,7 @@
240209
<plugin>
241210
<groupId>org.owasp</groupId>
242211
<artifactId>dependency-check-maven</artifactId>
243-
<version>6.1.0</version>
212+
<version>${dependency-check.version}</version>
244213
<configuration>
245214
<cveValidForHours>24</cveValidForHours>
246215
<failBuildOnCVSS>0</failBuildOnCVSS>
@@ -267,7 +236,7 @@
267236
<plugin>
268237
<groupId>org.jacoco</groupId>
269238
<artifactId>jacoco-maven-plugin</artifactId>
270-
<version>0.8.6</version>
239+
<version>${jacoco.version}</version>
271240
<executions>
272241
<execution>
273242
<id>prepare-agent</id>
@@ -293,7 +262,7 @@
293262
<plugins>
294263
<plugin>
295264
<artifactId>maven-gpg-plugin</artifactId>
296-
<version>1.6</version>
265+
<version>3.0.1</version>
297266
<executions>
298267
<execution>
299268
<id>sign-artifacts</id>
@@ -328,7 +297,7 @@
328297
<plugin>
329298
<groupId>org.sonatype.plugins</groupId>
330299
<artifactId>nexus-staging-maven-plugin</artifactId>
331-
<version>1.6.8</version>
300+
<version>${nexus-staging.version}</version>
332301
<extensions>true</extensions>
333302
<configuration>
334303
<serverId>ossrh</serverId>

src/main/java/module-info.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import org.cryptomator.cryptofs.CryptoFileSystemProvider;
2+
3+
import java.nio.file.spi.FileSystemProvider;
4+
5+
module org.cryptomator.cryptofs {
6+
requires transitive org.cryptomator.cryptolib;
7+
requires com.google.common;
8+
requires org.slf4j;
9+
requires dagger;
10+
requires com.auth0.jwt;
11+
12+
// filename-based module required by dagger
13+
// we will probably need to live with this for a while:
14+
// https://github.com/javax-inject/javax-inject/issues/33
15+
// May be provided by another lib during runtime
16+
requires static javax.inject;
17+
18+
exports org.cryptomator.cryptofs;
19+
exports org.cryptomator.cryptofs.common;
20+
exports org.cryptomator.cryptofs.migration;
21+
exports org.cryptomator.cryptofs.migration.api;
22+
23+
provides FileSystemProvider with CryptoFileSystemProvider;
24+
}

src/main/java/org/cryptomator/cryptofs/CiphertextFilePath.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ public int hashCode() {
4747

4848
@Override
4949
public boolean equals(Object obj) {
50-
if (obj instanceof CiphertextFilePath) {
51-
CiphertextFilePath other = (CiphertextFilePath) obj;
50+
if (obj instanceof CiphertextFilePath other) {
5251
return this.path.equals(other.path) && this.deflatedFileName.equals(other.deflatedFileName);
5352
} else {
5453
return false;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.cryptomator.cryptofs;
2+
3+
import java.nio.file.NoSuchFileException;
4+
5+
public class ContentRootMissingException extends NoSuchFileException {
6+
7+
public ContentRootMissingException(String msg) {
8+
super(msg);
9+
}
10+
}

0 commit comments

Comments
 (0)