Skip to content

Commit

Permalink
fix: corrected component to be published, removed hacks (#251)
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Dietisheim <[email protected]>
  • Loading branch information
adietish committed Oct 17, 2024
1 parent 559a944 commit 343627f
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ dependencies {

}

intellijPlatform {
buildSearchableOptions = false // no custom settings, see https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-faq.html#how-to-disable-building-the-searchable-options
}

tasks {
wrapper {
gradleVersion = providers.gradleProperty("gradleVersion").get()
Expand All @@ -91,24 +87,12 @@ tasks {
archiveClassifier.set("test")
}

withType<GenerateModuleMetadata> {
enabled = false
}

printProductsReleases {
channels = listOf(ProductRelease.Channel.EAP)
types = listOf(IntelliJPlatformType.IntellijIdeaCommunity)
untilBuild = provider { null }
}

// infamous hack, see https://github.com/gradle-nexus/publish-plugin/issues/354
assemble {
doLast {
println("************************ GENERATING FAKE JAR FOR PUBLISHING TO NEXUS *************************************************")
file("${layout.buildDirectory.get().asFile.absolutePath}/libs/intellij-common-${version}-searchableOptions.jar").writeText("...")
}
}

}

nexusPublishing {
Expand All @@ -133,7 +117,9 @@ val testArtifact = artifacts.add("archives", testJarFile) {
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
from(components["intellijPlatform"])
artifact(tasks.named("sourcesJar"))
artifact(tasks.named("javadocJar"))
artifact(testArtifact)
pom {
name.set("IntelliJ Common")
Expand Down

0 comments on commit 343627f

Please sign in to comment.