Add sources and javadocs jars to published artifacts
JCenter requires these
This commit is contained in:
parent
a893f80b75
commit
fe48e8cfc3
|
@ -14,10 +14,22 @@ ext {
|
||||||
version = libraryVersion
|
version = libraryVersion
|
||||||
group = 'com.theokanning.openai-gpt3-java'
|
group = 'com.theokanning.openai-gpt3-java'
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.allSource
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||||
|
classifier = 'javadoc'
|
||||||
|
from javadoc.destinationDir
|
||||||
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
ApiPublication(MavenPublication) {
|
ApiPublication(MavenPublication) {
|
||||||
from components.java
|
from components.java
|
||||||
|
artifact sourcesJar
|
||||||
|
artifact javadocJar
|
||||||
groupId project.group
|
groupId project.group
|
||||||
artifactId 'api'
|
artifactId 'api'
|
||||||
version libraryVersion
|
version libraryVersion
|
||||||
|
|
|
@ -7,7 +7,6 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
|
|
@ -16,10 +16,22 @@ ext {
|
||||||
version = libraryVersion
|
version = libraryVersion
|
||||||
group = 'com.theokanning.openai-gpt3-java'
|
group = 'com.theokanning.openai-gpt3-java'
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.allSource
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||||
|
classifier = 'javadoc'
|
||||||
|
from javadoc.destinationDir
|
||||||
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
ClientPublication(MavenPublication) {
|
ClientPublication(MavenPublication) {
|
||||||
from components.java
|
from components.java
|
||||||
|
artifact sourcesJar
|
||||||
|
artifact javadocJar
|
||||||
groupId project.group
|
groupId project.group
|
||||||
artifactId 'client'
|
artifactId 'client'
|
||||||
version libraryVersion
|
version libraryVersion
|
||||||
|
|
Loading…
Reference in New Issue