Skip to content

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Dec 5, 2023
2 parents 84adbeb + befe946 commit 4dbe693
Show file tree
Hide file tree
Showing 26 changed files with 401 additions and 142 deletions.
41 changes: 41 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "06:00"
timezone: "Etc/UTC"
groups:
java-test-dependencies:
patterns:
- "org.junit.jupiter:*"
- "org.mockito:*"
- "org.cryptomator:cryptofs"
maven-build-plugins:
patterns:
- "org.apache.maven.plugins:*"
- "org.jacoco:jacoco-maven-plugin"
- "org.owasp:dependency-check-maven"
- "org.sonatype.plugins:nexus-staging-maven-plugin"
java-production-dependencies:
patterns:
- "*"
exclude-patterns:
- "org.junit.jupiter:*"
- "org.mockito:*"
- "org.cryptomator:cryptofs"
- "org.apache.maven.plugins:*"
- "org.jacoco:jacoco-maven-plugin"
- "org.owasp:dependency-check-maven"
- "org.sonatype.plugins:nexus-staging-maven-plugin"

- package-ecosystem: "github-actions"
directory: "/" # even for `.github/workflows`
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 20
java-version: 21
distribution: 'zulu'
cache: 'maven'
- name: Ensure to use tagged version
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
if: ${{ !(github.actor == 'dependabot[bot]' && contains(fromJSON('["push"]'), github.event_name)) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 20
java-version: 21
distribution: 'zulu'
cache: 'maven'
- name: Initialize CodeQL
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: "refs/tags/${{ github.event.inputs.tag }}"
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 20
java-version: 21
distribution: 'zulu'
cache: 'maven'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 20
java-version: 21
distribution: 'zulu'
cache: 'maven'
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
Expand Down
3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Mirror.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 20 additions & 26 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.cryptomator</groupId>
<artifactId>fuse-nio-adapter</artifactId>
<version>3.0.0</version>
<version>4.0.0</version>
<name>FUSE-NIO-Adapter</name>
<description>Access resources at a given NIO path via FUSE.</description>
<url>https://github.com/cryptomator/fuse-nio-adapter</url>
Expand All @@ -17,24 +17,23 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.jdk>20</project.build.jdk>
<project.build.jdk>21</project.build.jdk>

<!-- dependencies -->
<integrations-api.version>1.2.0</integrations-api.version>
<jfuse.version>0.5.1</jfuse.version>
<guava.version>31.1-jre</guava.version>
<slf4j.version>2.0.7</slf4j.version>
<caffeine.version>3.1.6</caffeine.version>
<integrations-api.version>1.3.0</integrations-api.version>
<jfuse.version>0.6.3</jfuse.version>
<slf4j.version>2.0.9</slf4j.version>
<caffeine.version>3.1.8</caffeine.version>

<!-- test dependencies -->
<junit.jupiter.version>5.9.3</junit.jupiter.version>
<mockito.version>5.3.1</mockito.version>
<cryptofs.version>2.6.4</cryptofs.version>
<junit.jupiter.version>5.10.0</junit.jupiter.version>
<mockito.version>5.6.0</mockito.version>
<cryptofs.version>2.6.7</cryptofs.version>

<!-- build dependencies -->
<dependency-check.version>8.2.1</dependency-check.version>
<maven.deploy.version>3.1.0</maven.deploy.version>
<jacoco.version>0.8.9</jacoco.version>
<dependency-check.version>8.4.2</dependency-check.version>
<maven.deploy.version>3.1.1</maven.deploy.version>
<jacoco.version>0.8.11</jacoco.version>
</properties>

<licenses>
Expand Down Expand Up @@ -70,12 +69,7 @@
<version>${integrations-api.version}</version>
</dependency>

<!-- Guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<!-- Cache -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
Expand All @@ -96,7 +90,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
<version>24.1.0</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -158,7 +152,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.0</version>
<configuration>
<showWarnings>true</showWarnings>
<release>${project.build.jdk}</release>
Expand All @@ -185,7 +179,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.2.1</version>
<configuration>
<argLine>@{surefire.jacoco.args} --enable-preview --enable-native-access=ALL-UNNAMED</argLine>
</configuration>
Expand All @@ -197,7 +191,7 @@
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -209,7 +203,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<version>3.6.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -288,7 +282,7 @@
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down Expand Up @@ -323,7 +317,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
requires org.cryptomator.jfuse;
requires org.cryptomator.integrations.api;
requires org.slf4j;
requires com.google.common; // TODO try to remove
requires com.github.benmanes.caffeine;
requires static org.jetbrains.annotations;

provides MountService with LinuxFuseMountProvider, MacFuseMountProvider, FuseTMountProvider, WinFspMountProvider, WinFspNetworkMountProvider;
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.cryptomator.frontend.fuse;

import com.google.common.base.Preconditions;

import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.text.Normalizer;
import java.util.Objects;

/**
* Class to transcode filenames and path components from one encoding to another.
Expand All @@ -25,10 +24,10 @@ public class FileNameTranscoder {
private final boolean nioCharsetIsUnicode;

FileNameTranscoder(Charset fuseCharset, Charset nioCharset, Normalizer.Form fuseNormalization, Normalizer.Form nioNormalization) {
this.fuseCharset = Preconditions.checkNotNull(fuseCharset);
this.nioCharset = Preconditions.checkNotNull(nioCharset);
this.fuseNormalization = Preconditions.checkNotNull(fuseNormalization);
this.nioNormalization = Preconditions.checkNotNull(nioNormalization);
this.fuseCharset = Objects.requireNonNull(fuseCharset);
this.nioCharset = Objects.requireNonNull(nioCharset);
this.fuseNormalization = Objects.requireNonNull(fuseNormalization);
this.nioNormalization = Objects.requireNonNull(nioNormalization);
this.fuseCharsetIsUnicode = fuseCharset.name().startsWith("UTF");
this.nioCharsetIsUnicode = nioCharset.name().startsWith("UTF");
}
Expand Down
32 changes: 32 additions & 0 deletions src/main/java/org/cryptomator/frontend/fuse/OS.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.cryptomator.frontend.fuse;

enum OS {
LINUX,
MAC,
WINDOWS,
UNKNOWN;

private static String osName() {
class Holder {
private static final String OS_NAME = System.getProperty("os.name", "").toLowerCase();
}
return Holder.OS_NAME;
}

public static OS current() {
var name = osName();
if (name.contains("linux")) {
return LINUX;
} else if (name.contains("mac")) {
return MAC;
} else if (name.contains("windows")) {
return WINDOWS;
} else {
return UNKNOWN;
}
}

public boolean isCurrent() {
return equals(OS.current());
}
}
Loading

0 comments on commit 4dbe693

Please sign in to comment.