Skip to content

Commit

Permalink
Change artifactId for platform specific part
Browse files Browse the repository at this point in the history
+ use proper ide version in sample
  • Loading branch information
Walingar committed Oct 10, 2023
1 parent f96dedd commit 02c8130
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion buildSrc/src/main/kotlin/jewel-publish.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:Suppress("UnstableApiUsage")

import SupportedIJVersion.IJ_232
import SupportedIJVersion.IJ_233

plugins {
kotlin("jvm")
`maven-publish`
Expand Down Expand Up @@ -33,7 +36,11 @@ publishing {
from(components["kotlin"])
artifact(javadocJar)
artifact(sourcesJar)
version = project.version.toString()
val ijVersionRaw = when (supportedIJVersion()) {
IJ_232 -> "232"
IJ_233 -> "233"
}
version = "${project.version}-ij-$ijVersionRaw"
artifactId = "jewel-${project.name}"
pom {
name = "Jewel"
Expand Down
1 change: 1 addition & 0 deletions ide-laf-bridge/ide-laf-bridge-232/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ dependencies {
}

tasks.withType<AbstractPublishToMaven>().configureEach {
publication.artifactId = "jewel-ide-laf-bridge-platform-specific"
enabled = supportedIJVersion() == SupportedIJVersion.IJ_232
}
1 change: 1 addition & 0 deletions ide-laf-bridge/ide-laf-bridge-233/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ dependencies {
}

tasks.withType<AbstractPublishToMaven>().configureEach {
publication.artifactId = "jewel-ide-laf-bridge-platform-specific"
enabled = supportedIJVersion() == SupportedIJVersion.IJ_233
}
8 changes: 7 additions & 1 deletion samples/ide-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import SupportedIJVersion.*

plugins {
jewel
alias(libs.plugins.composeDesktop)
Expand All @@ -7,7 +9,11 @@ plugins {
intellij {
pluginName.set("Jewel Demo")
plugins.set(listOf("org.jetbrains.kotlin"))
version.set("2023.2.1")
val versionRaw = when (supportedIJVersion()) {
IJ_232 -> libs.versions.idea232.get()
IJ_233 -> libs.versions.idea233.get()
}
version.set(versionRaw)
}

// TODO remove this once the IJ Gradle plugin fixes their repositories bug
Expand Down

0 comments on commit 02c8130

Please sign in to comment.