Skip to content

Commit

Permalink
updated module-info and replaced moditect-maven-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
overheadhunter committed Oct 12, 2022
1 parent 47a6c2c commit 2d696b4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 43 deletions.
61 changes: 18 additions & 43 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,26 @@
<encoding>UTF-8</encoding>
<showWarnings>true</showWarnings>
</configuration>
<executions>
<execution>
<id>java9</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>9</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.4.0</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -179,7 +195,7 @@
<relocations>
<relocation>
<pattern>org.bouncycastle</pattern>
<shadedPattern>org.cryptomator.cryptolib.org.bouncycastle</shadedPattern>
<shadedPattern>org.cryptomator.cryptolib.shaded.bouncycastle</shadedPattern>
</relocation>
</relocations>
<filters>
Expand All @@ -194,47 +210,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<version>1.0.0.RC2</version>
<executions>
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<jvmVersion>9</jvmVersion>
<overwriteExistingFiles>true</overwriteExistingFiles>
<module>
<moduleInfoSource>
module org.cryptomator.cryptolib {
requires org.cryptomator.siv;
requires com.google.gson;
requires transitive com.google.common;
requires org.slf4j;

exports org.cryptomator.cryptolib.api;
exports org.cryptomator.cryptolib.common;

opens org.cryptomator.cryptolib.common to com.google.gson;

uses org.cryptomator.cryptolib.api.CryptorProvider;

provides org.cryptomator.cryptolib.api.CryptorProvider
with org.cryptomator.cryptolib.v1.CryptorProviderImpl, org.cryptomator.cryptolib.v2.CryptorProviderImpl;
}
</moduleInfoSource>
</module>
<jdepsExtraArgs>
<arg>--multi-release=9</arg>
</jdepsExtraArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
19 changes: 19 additions & 0 deletions src/main/java9/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module org.cryptomator.cryptolib {
requires static org.bouncycastle.provider; // will be shaded
requires static org.bouncycastle.pkix; // will be shaded
requires jdk.crypto.ec; // required at runtime for ECC
requires org.cryptomator.siv;
requires com.google.gson;
requires transitive com.google.common;
requires org.slf4j;

exports org.cryptomator.cryptolib.api;
exports org.cryptomator.cryptolib.common;

opens org.cryptomator.cryptolib.common to com.google.gson;

uses org.cryptomator.cryptolib.api.CryptorProvider;

provides org.cryptomator.cryptolib.api.CryptorProvider
with org.cryptomator.cryptolib.v1.CryptorProviderImpl, org.cryptomator.cryptolib.v2.CryptorProviderImpl;
}

0 comments on commit 2d696b4

Please sign in to comment.