mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
[JEWEL-963] Skip publishing sources and Javadoc artifacts for modules without source files
`intellij.platform.jewel.intUi.decoratedWindow` module has no source roots, and it should be skipped when publishing sources and javadoc artifacts. (cherry picked from commit c3bbf10df43e79937ac82108441c38c07669d328) (cherry picked from commit 678c68d500c1bf9aa71e2c29525f8dcbd88eac40) IJ-MR-173046 GitOrigin-RevId: c9cf6cfd34e6b61d8d570c725260ec2d2f14f29f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6e9126c3db
commit
8d93101e7f
@@ -94,7 +94,7 @@ open class IdeaCommunityProperties(private val communityHomeDir: Path) : BaseIde
|
||||
}
|
||||
}
|
||||
mavenArtifacts.isJavadocJarRequired = {
|
||||
JewelMavenArtifacts.isPublishedJewelModule(it)
|
||||
JewelMavenArtifacts.isPublishedJewelModule(it) && it.name != "intellij.platform.jewel.intUi.decoratedWindow"
|
||||
}
|
||||
mavenArtifacts.validate = { context, artifacts ->
|
||||
JewelMavenArtifacts.validate(context, artifacts)
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.jetbrains.intellij.build.impl.maven.GeneratedMavenArtifacts
|
||||
import org.jetbrains.intellij.build.impl.maven.MavenArtifactDependency
|
||||
import org.jetbrains.intellij.build.impl.maven.MavenCentralPublication
|
||||
import org.jetbrains.intellij.build.impl.maven.MavenCoordinates
|
||||
import org.jetbrains.jps.model.java.JavaSourceRootType
|
||||
import org.jetbrains.jps.model.module.JpsModule
|
||||
import org.jetbrains.jps.model.module.JpsModuleDependency
|
||||
|
||||
@@ -208,13 +209,15 @@ internal object JewelMavenArtifacts {
|
||||
|
||||
/** See https://central.sonatype.org/publish/requirements */
|
||||
private fun validateForMavenCentralPublication(artifacts: GeneratedMavenArtifacts) {
|
||||
val sources = artifacts.coordinates.getFileName("sources", "jar")
|
||||
check(artifacts.files.any { it.name == sources }) {
|
||||
"No $sources is generated for the module ${artifacts.module.name}"
|
||||
}
|
||||
val javadoc = artifacts.coordinates.getFileName("javadoc", "jar")
|
||||
check(artifacts.files.any { it.name == javadoc }) {
|
||||
"No $javadoc is generated for the module ${artifacts.module.name}"
|
||||
if (artifacts.module.getSourceRoots(JavaSourceRootType.SOURCE).any()) {
|
||||
val sources = artifacts.coordinates.getFileName("sources", "jar")
|
||||
check(artifacts.files.any { it.name == sources }) {
|
||||
"No $sources is generated for the module ${artifacts.module.name}"
|
||||
}
|
||||
val javadoc = artifacts.coordinates.getFileName("javadoc", "jar")
|
||||
check(artifacts.files.any { it.name == javadoc }) {
|
||||
"No $javadoc is generated for the module ${artifacts.module.name}"
|
||||
}
|
||||
}
|
||||
val pom = artifacts.coordinates.getFileName(packaging = "pom")
|
||||
val pomXml = artifacts.files.singleOrNull { it.name == pom }
|
||||
|
||||
Reference in New Issue
Block a user