JetBrains/java-annotations

Annotations for JVM-based languages.

Kotlin

465

278 commits

updated Aug 3, 2026

See the code

README

Annotations for JVM-based languages

official JetBrains project License Maven Central javadoc

A set of Java annotations which can be used in JVM-based languages. They serve as an additional documentation and can be interpreted by IDEs and static analysis tools to improve code analysis.

Change Log | Contributing | Code of Conduct

Documentation

Using the annotations

The annotations are published on Maven Central. To add a dependency using gradle write the following in the build.gradle file (Groovy DSL)

dependencies {
    compileOnly 'org.jetbrains:annotations:26.1.0'
}

or in the build.gradle.kts file (Kotlin DSL)

dependencies {
    compileOnly("org.jetbrains:annotations:26.1.0")
}

To add a dependency using Maven, write the following in pom.xml:

<dependency>
  <groupId>org.jetbrains</groupId>
  <artifactId>annotations</artifactId>
  <version>26.1.0</version>
  <scope>provided</scope>
</dependency>

annotations artifact requires JDK 1.8 or higher. If your project is compiled using JDK 1.5, 1.6 or 1.7 you can use the annotations-java5 artifact instead. Please note that annotations-java5 artifact is considered a legacy and will receive no further updates. The latest version of annotations-java5 is 24.1.0.

JetBrains/java-annotations

Annotations for JVM-based languages.

Kotlin

465

278 commits

updated Aug 3, 2026

See the code

README

Annotations for JVM-based languages

official JetBrains project License Maven Central javadoc

A set of Java annotations which can be used in JVM-based languages. They serve as an additional documentation and can be interpreted by IDEs and static analysis tools to improve code analysis.

Change Log | Contributing | Code of Conduct

Documentation

Using the annotations

The annotations are published on Maven Central. To add a dependency using gradle write the following in the build.gradle file (Groovy DSL)

dependencies {
    compileOnly 'org.jetbrains:annotations:26.1.0'
}

or in the build.gradle.kts file (Kotlin DSL)

dependencies {
    compileOnly("org.jetbrains:annotations:26.1.0")
}

To add a dependency using Maven, write the following in pom.xml:

<dependency>
  <groupId>org.jetbrains</groupId>
  <artifactId>annotations</artifactId>
  <version>26.1.0</version>
  <scope>provided</scope>
</dependency>

annotations artifact requires JDK 1.8 or higher. If your project is compiled using JDK 1.5, 1.6 or 1.7 you can use the annotations-java5 artifact instead. Please note that annotations-java5 artifact is considered a legacy and will receive no further updates. The latest version of annotations-java5 is 24.1.0.

Project health

Overall

2.8/10

Maintained

2/10

Code review

4/10
OpenSSF Scorecard

Significant stargazers

Timothy Gu

1,080 followers · starred Dec 2020

Bartek Pacia

557 followers · starred Mar 2025

Bruno Borges

1,102 followers · starred May 2021

Vladimir Kotal

85 followers · starred Sep 2020