Skip to content

JetBrains/java-annotations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b41de54 · Nov 15, 2023
Nov 15, 2023
May 20, 2021
Mar 19, 2021
Nov 10, 2021
Apr 1, 2021
Apr 22, 2019
Nov 15, 2023
Apr 18, 2019
Aug 4, 2020
Nov 30, 2021
Feb 26, 2018
Nov 15, 2023
Aug 11, 2021
Nov 15, 2023
May 20, 2021
May 20, 2021
Mar 19, 2021

Repository files navigation

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:24.1.0'
}

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

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

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

<dependency>
  <groupId>org.jetbrains</groupId>
  <artifactId>annotations</artifactId>
  <version>24.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, so most of new annotations will appear in the annotations artifact only.