-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't publish core libraries with ij-suffix
- Loading branch information
Showing
7 changed files
with
92 additions
and
36 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
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@file:Suppress("UnstableApiUsage") | ||
|
||
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 | ||
|
||
internal fun PublishingExtension.configureJewelRepositories() { | ||
repositories { | ||
maven("https://packages.jetbrains.team/maven/p/kpm/public") { | ||
name = "Space" | ||
credentials { | ||
username = System.getenv("MAVEN_SPACE_USERNAME") | ||
password = System.getenv("MAVEN_SPACE_PASSWORD") | ||
} | ||
} | ||
} | ||
} | ||
|
||
internal fun MavenPom.configureJewelPom() { | ||
name = "Jewel" | ||
description = "intelliJ theming system in for Compose." | ||
url = "https://github.com/JetBrains/jewel" | ||
licenses { | ||
license { | ||
name = "Apache License 2.0" | ||
url = "http://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:https://github.com/JetBrains/jewel.git" | ||
developerConnection = "scm:git:https://github.com/JetBrains/jewel.git" | ||
url = "https://github.com/JetBrains/jewel" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@file:Suppress("UnstableApiUsage") | ||
|
||
import SupportedIJVersion.IJ_232 | ||
import SupportedIJVersion.IJ_233 | ||
|
||
plugins { | ||
kotlin("jvm") | ||
`maven-publish` | ||
id("org.jetbrains.dokka") | ||
} | ||
|
||
val sourcesJar by tasks.registering(Jar::class) { | ||
from(kotlin.sourceSets.main.map { it.kotlin }) | ||
archiveClassifier = "sources" | ||
destinationDirectory = layout.buildDirectory.dir("artifacts") | ||
} | ||
|
||
val javadocJar by tasks.registering(Jar::class) { | ||
from(tasks.dokkaHtml) | ||
archiveClassifier = "javadoc" | ||
destinationDirectory = layout.buildDirectory.dir("artifacts") | ||
} | ||
|
||
publishing { | ||
configureJewelRepositories() | ||
|
||
publications { | ||
register<MavenPublication>("IdeMain") { | ||
from(components["kotlin"]) | ||
artifact(javadocJar) | ||
artifact(sourcesJar) | ||
val ijVersionRaw = when (supportedIJVersion()) { | ||
IJ_232 -> "232" | ||
IJ_233 -> "233" | ||
} | ||
version = "${project.version}-ij-$ijVersionRaw" | ||
artifactId = "jewel-${project.name}" | ||
pom { | ||
configureJewelPom() | ||
} | ||
} | ||
} | ||
} |
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
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
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,6 +1,6 @@ | ||
plugins { | ||
jewel | ||
`jewel-publish` | ||
`jewel-ij-publish` | ||
alias(libs.plugins.composeDesktop) | ||
} | ||
|
||
|
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,6 +1,6 @@ | ||
plugins { | ||
jewel | ||
`jewel-publish` | ||
`jewel-ij-publish` | ||
alias(libs.plugins.composeDesktop) | ||
} | ||
|
||
|