forked from JetBrains/intellij-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenSourceCommunityInstallersBuildTarget.kt
32 lines (29 loc) · 1.38 KB
/
OpenSourceCommunityInstallersBuildTarget.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2000-2024 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(options)
createBuildTasks(context).compileProjectAndTests(listOf("intellij.platform.jps.build.tests"))
buildDistributions(context)
spanBuilder("build standalone JPS").useWithScope {
buildCommunityStandaloneJpsBuilder(targetDir = context.paths.artifactDir.resolve("jps"), context = context)
}
}
}
}