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
|
||||
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 {
|
||||
publications {
|
||||
ApiPublication(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
groupId project.group
|
||||
artifactId 'api'
|
||||
version libraryVersion
|
||||
|
|
|
@ -7,7 +7,6 @@ buildscript {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
|
|
|
@ -16,10 +16,22 @@ ext {
|
|||
version = libraryVersion
|
||||
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 {
|
||||
publications {
|
||||
ClientPublication(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
groupId project.group
|
||||
artifactId 'client'
|
||||
version libraryVersion
|
||||
|
|
Loading…
Reference in New Issue