Skip to content

Commit 8dded6b

Browse files
authored
Merge pull request #103 from serjsysoev/multiplatform-final
Add multiplatform artifact
2 parents 2212ca6 + 33730df commit 8dded6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4192
-76
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Changelog
33

44
Version 25.0.0
55
---
6+
* Added Kotlin Multiplatform artifact (multiplatform-annotations).
67
* Removed Java 5 artifact.
78

89
Version 24.1.0

CONTRIBUTING.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ During the new version release:
1616
* Push changes
1717
* Use 'Draft a new release' button on the Releases GitHub page; select the added tag; copy it to the release title
1818
field; copy the added changelog section into the release details field.
19-
19+
20+
### Multiplatform artifact
21+
We publish two artifacts: annotations (annotations written in Java) and multiplatform-annotations (same annotations
22+
written in Kotlin Multiplatform). Please check that changes are done both in java-annotations and
23+
multiplatform-annotations folders. Jvm artifact of multiplatform-annotations should be a drop-in replacement of
24+
java-annotations, every annotation added to java-annotations should also be added to multiplatform-annotations.
25+
2026
### Backward compatibility
2127
All the changes should be backward compatible i.e. you can only add new annotations and new elements into existing annotation.
2228
If it's absolutely necessary to remove an annotation or its element we must firstly release a new major version where

build.gradle

+33-72
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ if (ext.publishingPassword == null) {
3838
println "##teamcity[setParameter name='java.annotations.version' value='$projectVersion']"
3939

4040
allprojects {
41-
group 'org.jetbrains'
41+
// https://github.com/gradle/gradle/issues/847
42+
group 'org.jetbrains.proto'
4243
version rootProject.ext.projectVersion
44+
45+
repositories {
46+
mavenCentral()
47+
}
4348
}
4449

4550
nexusPublishing {
@@ -55,85 +60,41 @@ subprojects {
5560
apply plugin: 'java'
5661
apply plugin: 'maven-publish'
5762
apply plugin: 'signing'
58-
59-
repositories {
60-
mavenCentral()
61-
}
6263
}
6364

64-
project(':java-annotations').archivesBaseName = 'annotations'
65-
66-
configure([project(':java-annotations')]) {
67-
task mainJar(type: Jar) {
68-
into ("META-INF/versions/9", {
69-
from (project(':module-info').sourceSets.main.output, {
70-
// Skip extra files from common sources compiled with Java 9 target
71-
include("module-info.class")
72-
})
73-
})
74-
manifest.attributes("Multi-Release": true)
75-
duplicatesStrategy = DuplicatesStrategy.FAIL
76-
}
77-
78-
task sourceJar(type: Jar) {
79-
into ("META-INF/versions/9", {
80-
from project(':module-info').sourceSets.main.java
81-
})
82-
duplicatesStrategy = DuplicatesStrategy.FAIL
83-
baseName = archivesBaseName + '-sources'
84-
}
85-
86-
task javadocJar(type: Jar) {
87-
duplicatesStrategy = DuplicatesStrategy.FAIL
88-
from javadoc
89-
}
90-
91-
artifacts {
92-
archives mainJar, sourceJar
93-
}
94-
65+
configure([project(':java-annotations'), project(':multiplatform-annotations')]) {
9566
publishing {
96-
publications {
97-
mavenJava(MavenPublication) {
98-
group rootProject.group
99-
version rootProject.ext.projectVersion
100-
artifactId archivesBaseName
101-
artifact mainJar
102-
artifact sourceJar {
103-
classifier 'sources'
104-
}
105-
artifact javadocJar {
106-
classifier 'javadoc'
107-
}
108-
pom.withXml {
109-
asNode().children().last() + {
110-
resolveStrategy = DELEGATE_FIRST
111-
name 'JetBrains Java Annotations'
112-
description 'A set of annotations used for code inspection support and code documentation.'
67+
publications.withType(MavenPublication) {
68+
group 'org.jetbrains'
69+
version rootProject.ext.projectVersion
70+
71+
pom.withXml {
72+
asNode().children().last() + {
73+
resolveStrategy = DELEGATE_FIRST
74+
name 'JetBrains Java Annotations'
75+
description 'A set of annotations used for code inspection support and code documentation.'
76+
url 'https://github.com/JetBrains/java-annotations'
77+
scm {
11378
url 'https://github.com/JetBrains/java-annotations'
114-
scm {
115-
url 'https://github.com/JetBrains/java-annotations'
116-
connection 'scm:git:git://github.com/JetBrains/java-annotations.git'
117-
developerConnection 'scm:git:ssh://github.com:JetBrains/java-annotations.git'
118-
}
119-
licenses {
120-
license {
121-
name 'The Apache Software License, Version 2.0'
122-
url 'https://www.apache.org/licenses/LICENSE-2.0.txt'
123-
distribution 'repo'
124-
}
79+
connection 'scm:git:git://github.com/JetBrains/java-annotations.git'
80+
developerConnection 'scm:git:ssh://github.com:JetBrains/java-annotations.git'
81+
}
82+
licenses {
83+
license {
84+
name 'The Apache Software License, Version 2.0'
85+
url 'https://www.apache.org/licenses/LICENSE-2.0.txt'
86+
distribution 'repo'
12587
}
126-
developers {
127-
developer {
128-
id 'JetBrains'
129-
name 'JetBrains Team'
130-
organization 'JetBrains'
131-
organizationUrl 'https://www.jetbrains.com'
132-
}
88+
}
89+
developers {
90+
developer {
91+
id 'JetBrains'
92+
name 'JetBrains Team'
93+
organization 'JetBrains'
94+
organizationUrl 'https://www.jetbrains.com'
13395
}
13496
}
13597
}
136-
13798
}
13899
}
139100
}

gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@
1515
#
1616

1717
projectVersion=25.0.0
18+
kotlin.code.style=official
19+
kotlin.mpp.stability.nowarn=true
20+
kotlin.stdlib.default.dependency=false

java-annotations/build.gradle

+42-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,55 @@
1515
*/
1616

1717
sourceCompatibility = 1.8
18+
project.archivesBaseName = 'annotations'
1819

19-
mainJar {
20+
task mainJar(type: Jar) {
21+
into ("META-INF/versions/9", {
22+
from (project(':java-module-info').sourceSets.main.output, {
23+
// Skip extra files from common sources compiled with Java 9 target
24+
include("module-info.class")
25+
})
26+
})
27+
manifest.attributes("Multi-Release": true)
2028
from sourceSets.main.output
29+
duplicatesStrategy = DuplicatesStrategy.FAIL
2130
}
2231

23-
sourceJar {
32+
task sourceJar(type: Jar) {
33+
into ("META-INF/versions/9", {
34+
from project(':java-module-info').sourceSets.main.java
35+
})
36+
duplicatesStrategy = DuplicatesStrategy.FAIL
2437
from sourceSets.main.java
38+
baseName = archivesBaseName + '-sources'
39+
}
40+
41+
task javadocJar(type: Jar) {
42+
duplicatesStrategy = DuplicatesStrategy.FAIL
43+
from javadoc
2544
}
2645

2746
javadoc {
2847
source = [sourceSets.main.java]
2948
}
49+
50+
artifacts {
51+
archives mainJar, sourceJar
52+
}
53+
54+
model {
55+
publishing {
56+
publications {
57+
pluginMaven(MavenPublication) {
58+
artifactId archivesBaseName
59+
artifact mainJar
60+
artifact sourceJar {
61+
classifier 'sources'
62+
}
63+
artifact javadocJar {
64+
classifier 'javadoc'
65+
}
66+
}
67+
}
68+
}
69+
}
File renamed without changes.

0 commit comments

Comments
 (0)