Skip to content

Commit

Permalink
Update publishing to new Publisher API
Browse files Browse the repository at this point in the history
  • Loading branch information
warriorzz committed May 5, 2024
1 parent c033744 commit 2daa6b3
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 98 deletions.
51 changes: 49 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.9.23"
kotlin("plugin.serialization") version "1.9.23"
id("org.jlleitschuh.gradle.ktlint") version "11.0.0"
id("org.jetbrains.dokka") version "1.9.20"
id("com.vanniktech.maven.publish") version "0.28.0"
}

group = "ee.bjarn"
Expand Down Expand Up @@ -57,6 +61,51 @@ tasks {
}
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()

coordinates(project.group.toString(), project.name, project.version.toString())

configure(KotlinJvm(
javadocJar = JavadocJar.Dokka("dokkaHtml"),
sourcesJar = true
))

pom {
name.set(project.name)
description.set("A coroutine based wrapper around the Spotify Web API, written in Kotlin.")
url.set("https://github.com/warriorzz/ktify")
inceptionYear.set("2021")

licenses {
license {
name.set("MIT License")
url.set("https://github.com/warriorzz/ktify/blob/main/LICENSE")
}
}

issueManagement {
system.set("GitHub")
url.set("https://github.com/warriorzz/ktify/issues")
}

scm {
connection.set("https://github.com/warriorzz/ktify.git")
url.set("https://github.com/warriorzz/ktify")
}

developers {
developer {
name.set("Bjarne Eberhardt")
email.set("[email protected]")
url.set("https://bjarn.ee")
timezone.set("Europe/Berlin")
}
}
}
}

ktlint {
verbose.set(true)
filter {
Expand All @@ -72,5 +121,3 @@ java {
// This avoids a Gradle warning
sourceCompatibility = JavaVersion.VERSION_11
}

apply(from = "publishing.gradle.kts")
96 changes: 0 additions & 96 deletions publishing.gradle.kts

This file was deleted.

0 comments on commit 2daa6b3

Please sign in to comment.