Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit fe48e8c

Browse files
committed
Add sources and javadocs jars to published artifacts
JCenter requires these
1 parent a893f80 commit fe48e8c

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

api/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,22 @@ ext {
1414
version = libraryVersion
1515
group = 'com.theokanning.openai-gpt3-java'
1616

17+
task sourcesJar(type: Jar, dependsOn: classes) {
18+
classifier = 'sources'
19+
from sourceSets.main.allSource
20+
}
21+
22+
task javadocJar(type: Jar, dependsOn: javadoc) {
23+
classifier = 'javadoc'
24+
from javadoc.destinationDir
25+
}
26+
1727
publishing {
1828
publications {
1929
ApiPublication(MavenPublication) {
2030
from components.java
31+
artifact sourcesJar
32+
artifact javadocJar
2133
groupId project.group
2234
artifactId 'api'
2335
version libraryVersion

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ buildscript {
77
}
88
}
99

10-
1110
allprojects {
1211
repositories {
1312
jcenter()

client/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,22 @@ ext {
1616
version = libraryVersion
1717
group = 'com.theokanning.openai-gpt3-java'
1818

19+
task sourcesJar(type: Jar, dependsOn: classes) {
20+
classifier = 'sources'
21+
from sourceSets.main.allSource
22+
}
23+
24+
task javadocJar(type: Jar, dependsOn: javadoc) {
25+
classifier = 'javadoc'
26+
from javadoc.destinationDir
27+
}
28+
1929
publishing {
2030
publications {
2131
ClientPublication(MavenPublication) {
2232
from components.java
33+
artifact sourcesJar
34+
artifact javadocJar
2335
groupId project.group
2436
artifactId 'client'
2537
version libraryVersion

0 commit comments

Comments
 (0)