aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2022-10-09 19:32:25 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2022-10-09 19:32:25 +0200
commite0022376763eaefe76ff2b552e0d91f21999ae8a (patch)
tree4a4e7140be02b563696792e434fc3ac3d072bfc9
parent119011dc82f87e4e7356b410ff02239bbe531794 (diff)
Make annotation dependencies optional again.
All static-analaysis-related annotation libraries are compile-time-only and can therefore be marked optional. Also changes the Java module descriptors to use 'requires static' instead of plain 'requires' for the corresponding modules, which lifts the runtime dependency from the point of view of the module system. Change-Id: I414907b002f6b0290ddb61b6f0ce899481c6efd3
-rw-r--r--jgvariant-core/pom.xml3
-rw-r--r--jgvariant-core/src/main/java/module-info.java6
-rw-r--r--jgvariant-ostree/pom.xml3
-rw-r--r--jgvariant-ostree/src/main/java/module-info.java8
4 files changed, 14 insertions, 6 deletions
diff --git a/jgvariant-core/pom.xml b/jgvariant-core/pom.xml
index 3409da7..a10fe3b 100644
--- a/jgvariant-core/pom.xml
+++ b/jgvariant-core/pom.xml
@@ -37,14 +37,17 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>org.apiguardian</groupId>
<artifactId>apiguardian-api</artifactId>
+ <optional>true</optional>
</dependency>
<!-- Static analysis -->
diff --git a/jgvariant-core/src/main/java/module-info.java b/jgvariant-core/src/main/java/module-info.java
index 6b45af0..6a743ed 100644
--- a/jgvariant-core/src/main/java/module-info.java
+++ b/jgvariant-core/src/main/java/module-info.java
@@ -80,9 +80,9 @@
* }
*/
module eu.mulk.jgvariant.core {
- requires com.google.errorprone.annotations;
- requires org.jetbrains.annotations;
- requires org.apiguardian.api;
+ requires static com.google.errorprone.annotations;
+ requires static org.apiguardian.api;
+ requires static org.jetbrains.annotations;
exports eu.mulk.jgvariant.core;
}
diff --git a/jgvariant-ostree/pom.xml b/jgvariant-ostree/pom.xml
index 1ca9c09..7b200a9 100644
--- a/jgvariant-ostree/pom.xml
+++ b/jgvariant-ostree/pom.xml
@@ -44,14 +44,17 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>org.apiguardian</groupId>
<artifactId>apiguardian-api</artifactId>
+ <optional>true</optional>
</dependency>
<!-- OSTree compression support -->
diff --git a/jgvariant-ostree/src/main/java/module-info.java b/jgvariant-ostree/src/main/java/module-info.java
index 18daf94..cdf65dd 100644
--- a/jgvariant-ostree/src/main/java/module-info.java
+++ b/jgvariant-ostree/src/main/java/module-info.java
@@ -80,10 +80,12 @@
*/
module eu.mulk.jgvariant.ostree {
requires transitive eu.mulk.jgvariant.core;
- requires com.google.errorprone.annotations;
- requires org.apiguardian.api;
- requires org.jetbrains.annotations;
+
requires org.tukaani.xz;
+ requires static com.google.errorprone.annotations;
+ requires static org.apiguardian.api;
+ requires static org.jetbrains.annotations;
+
exports eu.mulk.jgvariant.ostree;
}