Merge branch 'javadocAndSourcesJar' into 'master'

Javadoc and sources jar

See merge request pheerai/rcdbquery!2
This commit is contained in:
Oliver Rümpelein 2021-03-06 21:26:38 +01:00
commit e7ba06b66e
2 changed files with 15 additions and 1 deletions

View file

@ -18,6 +18,7 @@ inline fun <reified T> getFromExtra(prop: String) = project.extra[prop] as T
plugins {
kotlin("jvm")
`maven-publish`
id("org.jetbrains.dokka")
}
repositories {
@ -33,12 +34,13 @@ repositories {
}
}
project.version = "0.0.2"
project.version = "0.0.3-SNAPSHOT"
project.group = "de.pheerai.rcdb"
java {
targetCompatibility = getFromExtra("javaVersion")
sourceCompatibility = getFromExtra("javaVersion")
withSourcesJar()
}
kotlin {
@ -64,12 +66,23 @@ tasks {
test {
useJUnitPlatform()
}
val javadocJar by registering(Jar::class) {
from("dokkaJavadoc")
archiveClassifier.set("javadoc")
}
artifacts {
archives(javadocJar)
archives(jar)
}
}
publishing {
publications {
create<MavenPublication>("QueryBuilder") {
from(components["java"])
artifact(tasks["javadocJar"])
}
repositories {
maven {

View file

@ -1,6 +1,7 @@
pluginManagement {
plugins {
kotlin("jvm") version "1.4.30"
id("org.jetbrains.dokka") version "1.4.20"
}
}