Skip to content

Commit

Permalink
Update build.gradle.kts (#11)
Browse files Browse the repository at this point in the history
* Update build.gradle.kts

* simplify.

* simplify.
  • Loading branch information
portlek authored Jun 9, 2024
1 parent c28ddb6 commit 337ac3d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
22 changes: 17 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.MavenPublishPlugin
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.dokka.gradle.DokkaPlugin

plugins {
java
`maven-publish`
alias(libs.plugins.nexus)
alias(libs.plugins.nexus) apply false
alias(libs.plugins.kotlin) apply false
alias(libs.plugins.dokka) apply false
}
Expand All @@ -26,14 +26,26 @@ subprojects {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
withJavadocJar()
withSourcesJar()
}

tasks {
val javadocJar by creating(Jar::class) {
dependsOn("javadoc")
archiveClassifier.set("javadoc")
from(javadoc)
}

val sourcesJar by creating(Jar::class) {
dependsOn("classes")
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
}

val projectName = project.property("artifact-id") as String
val signRequired = project.hasProperty("sign-required")

mavenPublishing {
extensions.configure<MavenPublishBaseExtension> {
coordinates(project.group.toString(), projectName, project.version.toString())
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true)
if (signRequired) {
Expand Down
6 changes: 0 additions & 6 deletions kotlin/extensions/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
dependencies {
compileOnly(project(":common"))
}

tasks {
javadocJar {
from(dokkaJavadoc.map { it.outputs })
}
}
6 changes: 0 additions & 6 deletions kotlin/protobuf/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ dependencies {
compileOnly(libs.kotlinx.serialization.core)
compileOnly(libs.kotlinx.serialization.protobuf)
}

tasks {
javadocJar {
from(dokkaJavadoc.map { it.outputs })
}
}

0 comments on commit 337ac3d

Please sign in to comment.