-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update publishing to new Publisher API
- Loading branch information
Showing
2 changed files
with
49 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
@@ -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 { | ||
|
@@ -72,5 +121,3 @@ java { | |
// This avoids a Gradle warning | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
apply(from = "publishing.gradle.kts") |
This file was deleted.
Oops, something went wrong.