### Publish Javadoc and User Guide to GitHub Pages Source: https://github.com/apiguardian-team/apiguardian/wiki/Releasing Prepares Git for publishing docs, generates and uploads Javadoc and User Guide to GitHub pages, then restores original Git settings. The first command disables GPG signing and sets a temporary email; the second runs the Gradle task; the third re-enables signing and unsets the email. ```bash git config --global commit.gpgsign false && git config --global user.email $YOUR_EMAIL ``` ```bash ./gradlew --no-build-cache -PreplaceCurrentDocs clean gitPublishPush ``` ```bash git config --global commit.gpgsign true && git config --global --unset user.email ``` -------------------------------- ### Publish to Maven Central with Gradle Source: https://github.com/apiguardian-team/apiguardian/wiki/Releasing Publishes all artifacts to the Maven Central Portal with automatic publishing type. Run after updating the version in gradle.properties and README.MD, and committing the release. ```bash ./gradlew clean publishAllPublicationsToCentralPortal -PmavenCentralPublishingType=AUTOMATIC ``` -------------------------------- ### Gradle dependency with api Source: https://github.com/apiguardian-team/apiguardian/blob/main/README.md Declare the library as api to include it on the runtime classpath of downstream projects, allowing use of the @API annotation at runtime. ```gradle dependencies { api("org.apiguardian:apiguardian-api:1.1.2") } ``` -------------------------------- ### Java module with requires transitive Source: https://github.com/apiguardian-team/apiguardian/blob/main/README.md Declare the module dependency without 'static' to include the library on the runtime module path, allowing use of the @API annotation at runtime. ```java module org.example { requires transitive org.apiguardian.api; } ``` -------------------------------- ### Java module with static requires Source: https://github.com/apiguardian-team/apiguardian/blob/main/README.md Use 'requires static transitive' to include the library on the module path of downstream projects only at compile time, not at runtime. ```java module org.example { requires static transitive org.apiguardian.api; } ``` -------------------------------- ### Gradle dependency with compileOnlyApi Source: https://github.com/apiguardian-team/apiguardian/blob/main/README.md Use compileOnlyApi to include the library on the compile classpath of downstream projects but not their runtime classpath. ```gradle repositories { mavenCentral() } dependencies { compileOnlyApi("org.apiguardian:apiguardian-api:1.1.2") } ``` -------------------------------- ### Maven dependency for apiguardian-api Source: https://github.com/apiguardian-team/apiguardian/blob/main/README.md Declare the apiguardian-api artifact as a transitive compile-time dependency in Maven to avoid compile-time warnings. ```xml org.apiguardian apiguardian-api 1.1.2 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.