Skip to content

Commit

Permalink
Document usage in a module descriptor
Browse files Browse the repository at this point in the history
Resolves #29.
  • Loading branch information
marcphilipp committed Oct 16, 2024
1 parent 9d77ff3 commit 07296e3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Library that provides the `@API` annotation that is used to annotate public type

## How to use it

The @API Guardian library is deployed to Maven Central. You can simply add it as a dependency:
The @API Guardian library is deployed to Maven Central. To avoid compile-time warnings, you need to declare it as a _transitive_ compile-time dependency.

### Apache Maven

```xml
<dependency>
<groupId>org.apiguardian</groupId>
Expand All @@ -27,3 +28,11 @@ dependencies {
compileOnlyApi("org.apiguardian:apiguardian-api:1.1.2")
}
```

### Java Platform Module System

```java
module org.example {
requires static transitive org.apiguardian.api;
}
```

0 comments on commit 07296e3

Please sign in to comment.