Skip to content

Commit

Permalink
Fix publishing for api types
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Dec 7, 2024
1 parent 5bfdd92 commit 2e74777
Showing 1 changed file with 41 additions and 40 deletions.
81 changes: 41 additions & 40 deletions buildSrc/src/main/kotlin/mikbot-publishing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,58 @@ plugins {
com.google.cloud.artifactregistry.`gradle-plugin`
}

val sourcesJar by tasks.creating(Jar::class) {
dependsOn(tasks.processResources)
archiveClassifier = "sources"
destinationDirectory = layout.buildDirectory
from(sourceSets["main"].allSource)
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "dev.schlaubi"
artifactId = "mikbot-${project.name}"
afterEvaluate {
version = project.version as String
}

from(components["java"])
artifact(sourcesJar)
if (plugins.hasPlugin("org.jetbrains.kotlin.jvm")) {
create<MavenPublication>("maven") {
groupId = "dev.schlaubi"
artifactId = "mikbot-${project.name}"
afterEvaluate {
version = project.version as String
}

from(components["java"])
val sourcesJar by tasks.creating(Jar::class) {
dependsOn(tasks.processResources)
archiveClassifier = "sources"
destinationDirectory = layout.buildDirectory
from(sourceSets["main"].allSource)
}
artifact(sourcesJar)

pom {
name = "mikbot"
description = "A modular framework for building Discord bots"
url = "https://github.com/DRSchlaubi/mikmusic"
pom {
name = "mikbot"
description = "A modular framework for building Discord bots"
url = "https://github.com/DRSchlaubi/mikmusic"

organization {
name = "Schlaubi"
url = "https://github.com/DRSchlaubi"
}
organization {
name = "Schlaubi"
url = "https://github.com/DRSchlaubi"
}

developers {
developer {
name = "Michael Rittmeister"
developers {
developer {
name = "Michael Rittmeister"
}
}
}

issueManagement {
system = "GitHub"
url = "https://github.com/DRSchlaubi/mikmusic/issues"
}
issueManagement {
system = "GitHub"
url = "https://github.com/DRSchlaubi/mikmusic/issues"
}

licenses {
license {
name = "Apache 2.0"
url = "https://opensource.org/licenses/Apache-2.0"
licenses {
license {
name = "Apache 2.0"
url = "https://opensource.org/licenses/Apache-2.0"
}
}
scm {
connection = "scm:git:https://github.com/DRSchlaubi/mikmusic.git"
developerConnection = "scm:git:ssh://[email protected]:DRSchlaubi/mikmusic.git"
url = "https://github.com/DRSchlaubi/mikmusic.git"
}
}
scm {
connection = "scm:git:https://github.com/DRSchlaubi/mikmusic.git"
developerConnection = "scm:git:ssh://[email protected]:DRSchlaubi/mikmusic.git"
url = "https://github.com/DRSchlaubi/mikmusic.git"
}
}

Expand Down

0 comments on commit 2e74777

Please sign in to comment.