Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: corrected component to be published, removed hacks (#251) #252

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading