Skip to content

Commit

Permalink
Fix publishing of Markdown artefacts
Browse files Browse the repository at this point in the history
  • Loading branch information
rock3r committed Feb 14, 2024
1 parent c00ddb1 commit dbf726a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion buildSrc/src/main/kotlin/PublishConfiguration.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
@file:Suppress("UnstableApiUsage", "UnusedImports")

import org.gradle.api.Project
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPom
import org.gradle.kotlin.dsl.assign
import org.gradle.kotlin.dsl.maven
import java.io.File

internal fun PublishingExtension.configureJewelRepositories() {
internal fun PublishingExtension.configureJewelRepositories(project: Project) {
repositories {
maven("https://packages.jetbrains.team/maven/p/kpm/public") {
name = "Space"
Expand All @@ -14,6 +16,10 @@ internal fun PublishingExtension.configureJewelRepositories() {
password = System.getenv("MAVEN_SPACE_PASSWORD")
}
}

maven(project.rootProject.layout.buildDirectory.dir("maven-test")) {
name = "LocalTest"
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/jewel-publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ val javadocJar by tasks.registering(Jar::class) {
}

publishing {
configureJewelRepositories()
configureJewelRepositories(project)

publications {
register<MavenPublication>("main") {
Expand Down
4 changes: 4 additions & 0 deletions markdown/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ publicApiValidation {
// We don't foresee changes to the data models for now
excludedClassRegexes = setOf("org.jetbrains.jewel.markdown.MarkdownBlock.*")
}

publishing.publications.named<MavenPublication>("main") {
artifactId = "jewel-markdown-${project.name}"
}
4 changes: 4 additions & 0 deletions markdown/extension-gfm-alerts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ publicApiValidation {
// We don't foresee changes to the data models for now
excludedClassRegexes = setOf("org.jetbrains.jewel.markdown.extensions.github.alerts.Alert\\$.*")
}

publishing.publications.named<MavenPublication>("main") {
artifactId = "jewel-markdown-${project.name}"
}

0 comments on commit dbf726a

Please sign in to comment.