Skip to content

Commit

Permalink
Fix diktatFix and detektAll (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
nulls authored Jul 31, 2023
1 parent 013b92e commit d422192
Showing 1 changed file with 6 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ configurePublishing()
* Configures all aspects of the publishing process.
*/
fun Project.configurePublishing() {
createPublications()
configureNexusPublishing()
configureGitHubPublishing()
configurePublications()
Expand Down Expand Up @@ -60,21 +59,6 @@ fun Project.configurePublishing() {
}
}

/**
* Creates the publications.
*/
fun Project.createPublications() {
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
suppressPomMetadataWarningsFor("testFixturesApiElements")
suppressPomMetadataWarningsFor("testFixturesRuntimeElements")
}
}
}
}

/**
* Configures Maven Central as the publish destination.
*/
Expand Down Expand Up @@ -145,15 +129,16 @@ fun Project.configureGitHubPublishing(): Unit =
*/
@Suppress("TOO_LONG_FUNCTION")
fun Project.configurePublications() {
tasks.named<Jar>("javadocJar").configure {
from(tasks.findByName("dokkaJavadoc"))
@Suppress("GENERIC_VARIABLE_WRONG_DECLARATION")
val dokkaJarProvider = tasks.register<Jar>("dokkaJar") {
group = "documentation"
archiveClassifier.set("javadoc")
from(tasks.findByName("dokkaHtml"))
}

configure<PublishingExtension> {
publications.withType<MavenPublication>().configureEach {
artifact(dokkaJarProvider)
pom {
val project = this@configurePublications

name.set(project.name)
description.set(project.description ?: project.name)
url.set("https://github.com/saveourtool/osv4k")
Expand Down

0 comments on commit d422192

Please sign in to comment.