mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
IJI-2358 resolving the compiled classes
(cherry picked from commit d3ace03be2b6b3fc2450d3a18d94a1dd99b69ae1) IJ-MR-159792 GitOrigin-RevId: 918c5c77b52426b02e857c66c06b27e563c58674
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4b7903d81c
commit
cfac5e7bbe
@@ -3,6 +3,7 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.jetbrains.intellij.build.BuildPaths.Companion.COMMUNITY_ROOT
|
||||
import org.jetbrains.intellij.build.BuildPaths.Companion.ULTIMATE_HOME
|
||||
import org.jetbrains.intellij.build.CompilationTasks
|
||||
import org.jetbrains.intellij.build.IdeaCommunityProperties
|
||||
import org.jetbrains.intellij.build.JewelMavenArtifacts
|
||||
import org.jetbrains.intellij.build.impl.BuildContextImpl
|
||||
@@ -20,11 +21,12 @@ internal object JewelMavenArtifactsBuildTarget {
|
||||
projectHome = ULTIMATE_HOME,
|
||||
productProperties = IdeaCommunityProperties(COMMUNITY_ROOT.communityRoot),
|
||||
)
|
||||
CompilationTasks.create(context).compileModules(JewelMavenArtifacts.ALL_MODULES)
|
||||
val builder = MavenArtifactsBuilder(context)
|
||||
val outputDir = context.paths.artifactDir.resolve("maven-artifacts")
|
||||
outputDir.deleteRecursively()
|
||||
builder.generateMavenArtifacts(
|
||||
JewelMavenArtifacts.CORE.keys + JewelMavenArtifacts.STANDALONE.keys,
|
||||
JewelMavenArtifacts.ALL_MODULES,
|
||||
outputDir = outputDir.name,
|
||||
validate = true,
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ import kotlin.io.path.name
|
||||
|
||||
internal object JewelMavenArtifacts {
|
||||
private const val GROUP_ID: String = "org.jetbrains.jewel"
|
||||
val CORE: Map<String, String> = mapOf(
|
||||
private val CORE: Map<String, String> = mapOf(
|
||||
"intellij.platform.jewel.foundation" to "jewel-foundation",
|
||||
"intellij.platform.jewel.markdown.core" to "jewel-markdown-core",
|
||||
"intellij.platform.jewel.ui" to "jewel-ui",
|
||||
@@ -29,6 +29,9 @@ internal object JewelMavenArtifacts {
|
||||
"intellij.platform.jewel.decoratedWindow" to "jewel-decorated-window",
|
||||
)
|
||||
|
||||
private val ALL: Map<String, String> = CORE + STANDALONE
|
||||
val ALL_MODULES: Set<String> = ALL.keys
|
||||
|
||||
fun isJewel(module: JpsModule): Boolean {
|
||||
return module.name.startsWith("intellij.platform.jewel.")
|
||||
}
|
||||
@@ -68,8 +71,7 @@ internal object JewelMavenArtifacts {
|
||||
}
|
||||
|
||||
fun validate(context: BuildContext, mavenArtifacts: Collection<GeneratedMavenArtifacts>) {
|
||||
val jewelModules = CORE + STANDALONE
|
||||
jewelModules.keys.asSequence()
|
||||
ALL_MODULES.asSequence()
|
||||
.map(context::findRequiredModule)
|
||||
.flatMap { it.modulesTree() }
|
||||
.distinct().forEach { module ->
|
||||
@@ -90,7 +92,7 @@ internal object JewelMavenArtifacts {
|
||||
validateForMavenCentralPublication(artifact)
|
||||
}
|
||||
}
|
||||
for ((jewelModuleName, artifactId) in jewelModules) {
|
||||
for ((jewelModuleName, artifactId) in ALL) {
|
||||
check(mavenArtifacts.any { (module, mavenCoordinates) ->
|
||||
module.name == jewelModuleName &&
|
||||
mavenCoordinates.groupId == GROUP_ID &&
|
||||
|
||||
Reference in New Issue
Block a user