mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
IJI-2358 Jewel Maven artifacts build target
(cherry picked from commit d333b78045e444cff39e9b784141cb21f8c38900) IJ-MR-159792 GitOrigin-RevId: f7155bd292100357e2ee3ea4a03610599ae476c5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
720aebd79d
commit
ccf7641949
33
build/src/JewelMavenArtifactsBuildTarget.kt
Normal file
33
build/src/JewelMavenArtifactsBuildTarget.kt
Normal file
@@ -0,0 +1,33 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.jetbrains.intellij.build.BuildPaths.Companion.COMMUNITY_ROOT
|
||||
import org.jetbrains.intellij.build.IdeaCommunityProperties
|
||||
import org.jetbrains.intellij.build.JewelMavenArtifacts
|
||||
import org.jetbrains.intellij.build.impl.BuildContextImpl
|
||||
import org.jetbrains.intellij.build.impl.maven.MavenArtifactsBuilder
|
||||
import kotlin.io.path.ExperimentalPathApi
|
||||
import kotlin.io.path.deleteRecursively
|
||||
import kotlin.io.path.name
|
||||
|
||||
@OptIn(ExperimentalPathApi::class)
|
||||
internal object JewelMavenArtifactsBuildTarget {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
runBlocking(Dispatchers.Default) {
|
||||
val context = BuildContextImpl.createContext(
|
||||
projectHome = COMMUNITY_ROOT.communityRoot,
|
||||
productProperties = IdeaCommunityProperties(COMMUNITY_ROOT.communityRoot),
|
||||
)
|
||||
val builder = MavenArtifactsBuilder(context)
|
||||
val outputDir = context.paths.artifactDir.resolve("maven-artifacts")
|
||||
outputDir.deleteRecursively()
|
||||
builder.generateMavenArtifacts(
|
||||
JewelMavenArtifacts.CORE.keys + JewelMavenArtifacts.STANDALONE.keys,
|
||||
outputDir = outputDir.name,
|
||||
validate = true,
|
||||
)
|
||||
context.notifyArtifactBuilt(outputDir)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user