Skip to content

Commit

Permalink
Merge branch 'release/1.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
overheadhunter committed Oct 10, 2018
2 parents 0b0c9f8 + 7562225 commit 0603844
Show file tree
Hide file tree
Showing 44 changed files with 1,091 additions and 371 deletions.
47 changes: 12 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,27 @@
language: java
sudo: false
jdk:
- oraclejdk9
- oraclejdk10
env:
global:
- secure: LT4nMSKCu4qL+jQ80BdBIOqFO3GCyAPoxNkskS0q0wvscDpEx2bvFZa9KF6/dQxubhWnfACqWxxPKfF3VadfZoKn1z01TaZ/rKHkA5GedZweFO0wBIvi/gDIcAxVX0oPOkIruugYY3iDOzOqTUuBM686cW1XWs0LEV7qPTb6KM02/IeckQs+P9SSiarqSKROlQ8dABGdyxJTXheHHphFu4mDiQsi1vtub6OoQclKLLuK2MJvFiyDeZDYYXAnjFNC/pcBUBjr5b886zPB6HLLGgvQKRLvzQudedz08ZlJdnt3k6u7HvLINbs00U60fnD/+4krQQN4EEx0Natv4L1SxFjYO4wFK2FTCKoBMkVfjINqiWzmb/yhoG33Sw9VGiYdcV45QbH32CX1oiATohV+79gfIID6p3UOL1SZuELR2XzRq70K4Kw2BXig99a0+LjYCv4ynnzetqyWVZIdhBQ1Srf/4GxUwF21Urn9TJCNr2F5BcbqGrMUMvXNjTI0WqQCTMqM+Ha9Rbe27GG7ZMtMUHd83YWP0GDiSIg2S0T0lNL2e9iQGXsGBiX3Bz+E3HEWhnE4l6XKYVgn3NXrlDjwc2B6GTGeImZXkrbFFJwQihUSujj5H6l/+5a7NxbyA1MvzNwjeTaHzdNdYovTq6ywydVtF/Kt5h7oA2KmUoajaFs= #CODACY_PROJECT_TOKEN
- secure: mwZwO9cYqxQjg1eyqpMdN/9Lmy9NuDpRm8EpCZbh3CMcPWeU0rLXYObK2z2OCYNF5RNwgGytR/hFsi524QW2jGxfYzyHN17Y7/OFbyexE3PFBTabJZzRT5RzZNm2Wt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lNL2e9iQGXsGBiX3Bz+E3HEWhnE4l6XKYVgn3NXrlDjwc2B6GTGeImZXkrbFFJwQihUSujj5H6l/+5a7NxbyA1MvzNwjeTaHzdNdYovTq6ywydVtF/Kt5h7oA2KmUoajaFs=" # CODACY_PROJECT_TOKEN
- secure: "E5T75tGRnA6kplWe1/gxnvHzzZn5Z1/Wb58Th67Nm0MHmGK8PnR0tukcQbfNPsGMp3P3lb+wmTFfNeiuWXfan88F5CrktBJYJgsNQxWMnNk1fcT+QNyHlm7Xngpm/ntHGJCDGF/yFuJLvwzlD6SDSTAU709MxB60aoKVDtylGkkLhVWpNMtSNwgjRu2pzGjR8VxOWckt4zQw4mSXQfVZqHsQAPWGTGKktN08/ff71FyoO2uKffnzhLny9wjsUx7ora2/EyKDqFpkqMvOEN2njcMc6QF5M041VzoYw/gsURowImRHP385xqqg4kl45Fb7unHVv2rz1rRwSbWlJawGBRrzkLR+B1+sE2Jij0o30Wifijwh3HRtHIR7k0T7f893xN7B6du4VhKhKrYMVUn9xVILEWElkwHb50BnBP/3zTfrm38/nlW+KtY+vBSrvqbfAfaoKsJZQuNcJ8ezcvdMXVHuOWixozJpHROFvLRzMJJCB07mSNdGTgX8jI34se+299/M0sLpT5N8PQ8WJjs5h+YkK6FLL7KqEOR6QWHkgYamZirQF2dqYw1Rdw37x5Lad6Py938lBn5P5c+Gx00D43MwoN31tiTWdp/NlUyFbEPst225Fj1/VpLDnZiek+QcgAf6PzpejeKyS018EEiO10CYgb2J38nivQ6RuvU9kII=" # BINTRAY_API_KEY
install:
- curl -o $HOME/.m2/settings.xml https://gist.githubusercontent.com/cryptobot/cf5fbd909c4782aaeeeb7c7f4a1a43da/raw/e60ee486e34ee0c79f89f947abe2c83b4290c6bb/settings.xml
- mvn source:help javadoc:help dependency:go-offline -Pdependency-check,coverage,release
before_script:
- "if [[ ${TRAVIS_BRANCH} == 'develop' && ${TRAVIS_PULL_REQUEST} == 'false' ]]; then mvn dependency-check:check -Pdependency-check; fi"
- mvn --update-snapshots dependency-check:check -Pdependency-check
script:
- "mvn clean test jacoco:report verify -Pcoverage"
- mvn clean test jacoco:report verify -Pcoverage -Dorg.slf4j.simpleLogger.defaultLogLevel=debug
after_success:
- jdk_switcher use oraclejdk8
- curl -o ~/codacy-coverage-reporter-assembly-latest.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/2.0.1/codacy-coverage-reporter-2.0.1-assembly.jar
- $JAVA_HOME/bin/java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r target/site/jacoco/jacoco.xml
- curl -o ~/codacy-coverage-reporter.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/4.0.3/codacy-coverage-reporter-4.0.3-assembly.jar
- $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r target/site/jacoco/jacoco.xml
cache:
directories:
- $HOME/.m2
addons:
apt:
packages:
- haveged
coverity_scan:
project:
name: "cryptomator/cryptofs"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "mvn clean"
build_command: "mvn compile -DskipTests=true"
branch_pattern: release.*
before_deploy:
- jdk_switcher use oraclejdk9
- "if ! gpg --list-secret-keys 34C80F11; then gpg --import 34C80F11.gpg; fi"
deploy:
- provider: script # SNAPSHOTS
script: mvn clean deploy -DskipTests -Prelease --settings settings.xml
skip_cleanup: true
on:
repo: cryptomator/cryptofs
branch: develop
condition: $TRAVIS_TAG = ''
- provider: script # RELEASES
script: mvn clean versions:set -DnewVersion=${TRAVIS_TAG} deploy -DskipTests -Prelease --settings settings.xml
- provider: script
script: mvn clean versions:set -DnewVersion=${TRAVIS_TAG} deploy -DskipTests -Prelease
skip_cleanup: true
on:
repo: cryptomator/cryptofs
Expand All @@ -62,3 +37,5 @@ deploy:
on:
repo: cryptomator/cryptofs
tags: true
after_deploy:
- "echo '{\"close\": \"1\"}' | curl -v -X POST -u cryptobot:${BINTRAY_API_KEY} https://api.bintray.com/maven_central_sync/cryptomator/maven/cryptofs/versions/${TRAVIS_TAG}"
57 changes: 0 additions & 57 deletions 34C80F11.gpg

This file was deleted.

72 changes: 23 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.cryptomator</groupId>
<artifactId>cryptofs</artifactId>
<version>1.5.2</version>
<version>1.6.0</version>
<name>Cryptomator Crypto Filesystem</name>
<description>This library provides the Java filesystem provider used by Cryptomator.</description>
<url>https://github.com/cryptomator/cryptofs</url>
Expand All @@ -14,9 +14,9 @@
</scm>

<properties>
<cryptolib.version>1.2.0</cryptolib.version>
<dagger.version>2.15</dagger.version>
<guava.version>24.1-jre</guava.version>
<cryptolib.version>1.2.1</cryptolib.version>
<dagger.version>2.17</dagger.version>
<guava.version>26.0-jre</guava.version>
<slf4j.version>1.7.25</slf4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down Expand Up @@ -44,18 +44,20 @@
<organization>cryptomator.org</organization>
<organizationUrl>http://cryptomator.org</organizationUrl>
</developer>
<developer>
<name>Armin Schrenk</name>
<email>[email protected]</email>
<timezone>+1</timezone>
<organization>cryptomator.org</organization>
<organizationUrl>http://cryptomator.org</organizationUrl>
</developer>
</developers>

<repositories>
<repository>
<id>ossrh-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>bintray</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>

Expand Down Expand Up @@ -88,7 +90,7 @@
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>${dagger.version}</version>
<optional>true</optional>
<scope>provided</scope>
</dependency>

<!-- Test -->
Expand All @@ -107,7 +109,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.11.0</version>
<version>2.23.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -135,7 +137,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -154,7 +156,7 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>3.1.2</version>
<version>3.3.2</version>
<configuration>
<cveValidForHours>24</cveValidForHours>
<failBuildOnCVSS>0</failBuildOnCVSS>
Expand All @@ -178,7 +180,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<version>0.8.2</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand All @@ -195,13 +197,9 @@
<profile>
<id>release</id>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
<id>bintray-jcenter</id>
<url>https://api.bintray.com/maven/cryptomator/maven/cryptofs/;publish=1</url>
</repository>
</distributionManagement>
<build>
Expand All @@ -220,7 +218,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -232,7 +230,7 @@
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<version>3.1.1</version>
<executions>
<execution>
<id>generate-dependency-list</id>
Expand All @@ -247,30 +245,6 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down
23 changes: 0 additions & 23 deletions settings.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,24 @@
import java.nio.file.attribute.BasicFileAttributeView;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.FileTime;
import java.util.Optional;

abstract class AbstractCryptoFileAttributeView<S extends BasicFileAttributes, T extends BasicFileAttributeView> implements BasicFileAttributeView {

protected final Path ciphertextPath;
protected final CryptoFileAttributeProvider fileAttributeProvider;
protected final T delegate;
private final Class<S> attributesType;
private final ReadonlyFlag readonlyFlag;
private final Optional<OpenCryptoFile> openCryptoFile;

public AbstractCryptoFileAttributeView(Path ciphertextPath, CryptoFileAttributeProvider fileAttributeProvider, Class<S> attributesType, Class<T> delegateType) throws UnsupportedFileAttributeViewException {
public AbstractCryptoFileAttributeView(Path ciphertextPath, CryptoFileAttributeProvider fileAttributeProvider, ReadonlyFlag readonlyFlag, Class<S> attributesType, Class<T> delegateType, Optional<OpenCryptoFile> openCryptoFile)
throws UnsupportedFileAttributeViewException {
this.ciphertextPath = ciphertextPath;
this.fileAttributeProvider = fileAttributeProvider;
this.readonlyFlag = readonlyFlag;
this.attributesType = attributesType;
this.openCryptoFile = openCryptoFile;
this.delegate = ciphertextPath.getFileSystem().provider().getFileAttributeView(ciphertextPath, delegateType);
if (delegate == null) {
throw new UnsupportedFileAttributeViewException();
Expand All @@ -38,7 +44,9 @@ public final S readAttributes() throws IOException {

@Override
public void setTimes(FileTime lastModifiedTime, FileTime lastAccessTime, FileTime createTime) throws IOException {
readonlyFlag.assertWritable();
delegate.setTimes(lastModifiedTime, lastAccessTime, createTime);
openCryptoFile.ifPresent(file -> file.setLastModifiedTime(lastModifiedTime));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributeView;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Optional;

class CryptoBasicFileAttributeView extends AbstractCryptoFileAttributeView<BasicFileAttributes, BasicFileAttributeView> implements BasicFileAttributeView {

public CryptoBasicFileAttributeView(Path ciphertextPath, CryptoFileAttributeProvider fileAttributeProvider) throws UnsupportedFileAttributeViewException {
super(ciphertextPath, fileAttributeProvider, BasicFileAttributes.class, BasicFileAttributeView.class);
public CryptoBasicFileAttributeView(Path ciphertextPath, CryptoFileAttributeProvider fileAttributeProvider, ReadonlyFlag readonlyFlag, Optional<OpenCryptoFile> openCryptoFile) throws UnsupportedFileAttributeViewException {
super(ciphertextPath, fileAttributeProvider, readonlyFlag, BasicFileAttributes.class, BasicFileAttributeView.class, openCryptoFile);
}

@Override
Expand Down
Loading

0 comments on commit 0603844

Please sign in to comment.