mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
[build scripts] dropping JPS-based updater build task
Since updater migration to Gradle, the task was producing an incorrect artifact with missing manifest. GitOrigin-RevId: ee4407f9964818477314863864754ac52c354998
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b7a4fa5972
commit
0195734dfa
@@ -57,11 +57,4 @@
|
||||
<echo message="***** Using ant is OBSOLETE, please call tests.cmd directly. See README.md *****" level="warning" />
|
||||
<jps-bootstrap class="CommunityRunTestsBuildTarget" module="intellij.idea.community.build" />
|
||||
</target>
|
||||
|
||||
<!-- Creates an updater-full.jar in ${intellij.build.output.root}/artifacts, it includes 'intellij.platform.updater' module with all its dependencies -->
|
||||
<!-- this is deprecated, please use full_updater.cmd directly -->
|
||||
<target name="fullupdater">
|
||||
<echo message="***** Using ant is OBSOLETE, please call build/full_updater.cmd directly. See README.md *****" level="warning" />
|
||||
<jps-bootstrap class="FullUpdaterBuildTarget" module="intellij.idea.community.build" />
|
||||
</target>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
:<<"::CMDLITERAL"
|
||||
@ECHO OFF
|
||||
GOTO :CMDSCRIPT
|
||||
::CMDLITERAL
|
||||
|
||||
set -eux
|
||||
exec "$(cd "$(dirname "$0")"; pwd)/../platform/jps-bootstrap/jps-bootstrap.sh" "$@" "$(cd "$(dirname "$0")"; pwd)/.." intellij.idea.community.build FullUpdaterBuildTarget
|
||||
:CMDSCRIPT
|
||||
|
||||
call "%~dp0\..\platform\jps-bootstrap\jps-bootstrap.cmd" %* "%~dp0\.." intellij.idea.community.build FullUpdaterBuildTarget
|
||||
EXIT /B %ERRORLEVEL%
|
||||
@@ -1,21 +0,0 @@
|
||||
// Copyright 2000-2024 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.createBuildTasks
|
||||
import org.jetbrains.intellij.build.createCommunityBuildContext
|
||||
|
||||
object FullUpdaterBuildTarget {
|
||||
private const val UPDATER_MODULE_NAME = "intellij.platform.updater"
|
||||
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
runBlocking(Dispatchers.Default) {
|
||||
val context = createCommunityBuildContext()
|
||||
val tasks = createBuildTasks(context)
|
||||
tasks.compileModules(listOf(UPDATER_MODULE_NAME))
|
||||
tasks.buildFullUpdaterJar()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,10 +51,5 @@ interface BuildTasks {
|
||||
compileModules(moduleNames = moduleNames, includingTestsInModules = java.util.List.of())
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds updater-full.jar artifact which includes 'intellij.platform.updater' module with all its dependencies
|
||||
*/
|
||||
suspend fun buildFullUpdaterJar()
|
||||
|
||||
suspend fun buildUnpackedDistribution(targetDirectory: Path, includeBinAndRuntime: Boolean)
|
||||
}
|
||||
|
||||
@@ -116,10 +116,6 @@ class BuildTasksImpl(private val context: BuildContextImpl) : BuildTasks {
|
||||
CompilationTasks.create(context).compileModules(moduleNames)
|
||||
}
|
||||
|
||||
override suspend fun buildFullUpdaterJar() {
|
||||
buildUpdaterJar(context = context, artifactName = "updater-full.jar")
|
||||
}
|
||||
|
||||
override suspend fun buildUnpackedDistribution(targetDirectory: Path, includeBinAndRuntime: Boolean) {
|
||||
val currentOs = OsFamily.currentOs
|
||||
context.paths.distAllDir = targetDirectory
|
||||
@@ -988,24 +984,6 @@ private fun logFreeDiskSpace(phase: String, context: CompilationContext) {
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun buildUpdaterJar(context: BuildContext, artifactName: String = "updater.jar") {
|
||||
val updaterModule = context.findRequiredModule("intellij.platform.updater")
|
||||
val updaterModuleSource = DirSource(context.getModuleOutputDir(updaterModule), excludes = commonModuleExcludes)
|
||||
val librarySources = JpsJavaExtensionService.dependencies(updaterModule)
|
||||
.productionOnly()
|
||||
.runtimeOnly()
|
||||
.libraries
|
||||
.asSequence()
|
||||
.flatMap { it.getRootUrls(JpsOrderRootType.COMPILED) }
|
||||
.filter { !JpsPathUtil.isJrtUrl(it) }
|
||||
.map {
|
||||
ZipSource(file = Path.of(JpsPathUtil.urlToPath(it)), excludes = listOf(Regex("^META-INF/.*")), distributionFileEntryProducer = null)
|
||||
}
|
||||
val updaterJar = context.paths.artifactDir.resolve(artifactName)
|
||||
buildJar(targetFile = updaterJar, sources = (sequenceOf(updaterModuleSource) + librarySources).toList(), compress = true)
|
||||
context.notifyArtifactBuilt(updaterJar)
|
||||
}
|
||||
|
||||
private fun buildCrossPlatformZip(distResults: List<DistributionForOsTaskResult>, context: BuildContext): Path {
|
||||
val executableName = context.productProperties.baseFileName
|
||||
|
||||
|
||||
Reference in New Issue
Block a user