Files
openide/build/src/OpenSourceCommunityInstallersBuildTarget.kt
Vladimir Krivosheev 5671f52c99 IJPL-373 rename useWithScope2 to useWithScope (part 2 - rename)
GitOrigin-RevId: f714fd03a779c8f4e584024221ee20d8465e3aa7
2023-11-24 18:04:06 +00:00

32 lines
1.4 KiB
Kotlin

// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
import com.intellij.platform.diagnostic.telemetry.helpers.useWithScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking
import org.jetbrains.intellij.build.*
import org.jetbrains.intellij.build.TraceManager.spanBuilder
import org.jetbrains.intellij.build.impl.buildDistributions
object OpenSourceCommunityInstallersBuildTarget {
@JvmStatic
fun main(args: Array<String>) {
val options = BuildOptions().apply {
// we cannot provide a consistent build number for IDEA Community if it's built separately so use *.SNAPSHOT number to avoid confusion
buildNumber = null
// do not bother external users about clean/incremental
// just remove out/ directory for clean build
incrementalCompilation = true
useCompiledClassesFromProjectOutput = false
buildStepsToSkip += BuildOptions.MAC_SIGN_STEP
}
runBlocking(Dispatchers.Default) {
val context = createCommunityBuildContext(IdeaProjectLoaderUtil.guessCommunityHome(javaClass), options)
BuildTasks.create(context).compileProjectAndTests(listOf("intellij.platform.jps.build.tests"))
buildDistributions(context)
spanBuilder("build standalone JPS").useWithScope {
buildCommunityStandaloneJpsBuilder(targetDir = context.paths.artifactDir.resolve("jps"), context = context)
}
}
}
}