Java Library
data class JavaLibrary @JvmOverloads constructor(val javadocJar: JavadocJar, val sourcesJar: Boolean = true) : Platform
To be used for java and java-library projects. Applying this creates a publication for the component called java. Depending on the passed parameters for javadocJar and sourcesJar, -javadoc and -sources jars will be added to the publication.
Equivalent Gradle set up:
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}
java {
withSourcesJar()
withJavadocJar()
}Content copied to clipboard