Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document usage in a module descriptor #51

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
```