Skip to content

Remove java5 artifact #101

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

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
===

Version 25.0.0
---
* Removed Java 5 artifact.

Version 24.1.0
---
* `@CheckReturnValue` is not experimental anymore.
Expand Down
7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ During the new version release:
* Use 'Draft a new release' button on the Releases GitHub page; select the added tag; copy it to the release title
field; copy the added changelog section into the release details field.

### Java 5 package
We generate annotations-java5 package for legacy clients. This package cannot use ElementType.TYPE_USE
which appeared in Java 8. The Java 5 package is generated from common/src sources
stripping the `, ElementType.TYPE_USE` substring from files.
So no Java features that appear in Java 6 or higher except `ElementType.TYPE_USE` should be used in common/src.
New TYPE_USE annotations should be created in java8/src. They will not appear in annotations-java5 package.

### Backward compatibility
All the changes should be backward compatible i.e. you can only add new annotations and new elements into existing annotation.
If it's absolutely necessary to remove an annotation or its element we must firstly release a new major version where
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ using gradle write the following in the
`build.gradle` file (Groovy DSL)
```
dependencies {
compileOnly 'org.jetbrains:annotations:24.1.0'
compileOnly 'org.jetbrains:annotations:25.0.0'
}

```

or in the `build.gradle.kts` file (Kotlin DSL)
```
dependencies {
compileOnly("org.jetbrains:annotations:24.1.0")
compileOnly("org.jetbrains:annotations:25.0.0")
}

```
Expand All @@ -34,11 +34,11 @@ 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>
<version>25.0.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.
`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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mention the latest Java 5 compatible version here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

and will receive no further updates. The latest version of `annotations-java5` is 24.1.0.
9 changes: 2 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,9 @@ subprojects {
}
}

project(':java5').archivesBaseName = 'annotations-java5'
project(':java8').archivesBaseName = 'annotations'
project(':java-annotations').archivesBaseName = 'annotations'

configure([project(':java5'), project(':java8')]) {
dependencies {
compile project(':module-info')
}

configure([project(':java-annotations')]) {
task mainJar(type: Jar) {
into ("META-INF/versions/9", {
from (project(':module-info').sourceSets.main.output, {
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
# limitations under the License.
#

projectVersion=24.1.0
#JDK_5=<path-to-older-java-version>
projectVersion=25.0.0
13 changes: 12 additions & 1 deletion common/build.gradle → java-annotations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,15 @@
*/

sourceCompatibility = 1.8
javadoc.enabled = false

mainJar {
from sourceSets.main.output
}

sourceJar {
from sourceSets.main.java
}

javadoc {
source = [sourceSets.main.java]
}
61 changes: 0 additions & 61 deletions java5/build.gradle

This file was deleted.

31 changes: 0 additions & 31 deletions java8/build.gradle

This file was deleted.

4 changes: 2 additions & 2 deletions module-info/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
sourceCompatibility = 1.9

dependencies {
compile project(':common')
compile project(':java-annotations')
}

compileJava {
// Without common sources, compiler complains that exported packages don't exist
source = [sourceSets.main.java, project(':common').sourceSets.main.java]
source = [sourceSets.main.java, project(':java-annotations').sourceSets.main.java]
}

task mainJar(type: Jar) {
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

rootProject.name = 'annotations-parent'

include 'common', 'java5', 'java8', 'module-info'
include 'java-annotations', 'module-info'