cleanup: remove useless '@author nik' from javadoc comments
[idea/community.git] / build / groovy / org / jetbrains / intellij / build / IdeaCommunityBuilder.groovy
1 // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
2 package org.jetbrains.intellij.build
3
4 import groovy.transform.CompileStatic
5
6 @CompileStatic
7 class IdeaCommunityBuilder {
8   private final BuildContext buildContext
9
10   IdeaCommunityBuilder(String home, BuildOptions options = new BuildOptions(), String projectHome = home) {
11     buildContext = BuildContext.createContext(home, projectHome, new IdeaCommunityProperties(home), ProprietaryBuildTools.DUMMY, options)
12   }
13
14   IdeaCommunityBuilder(BuildContext buildContext) {
15     this.buildContext = buildContext
16   }
17
18   void compileModules() {
19     BuildTasks.create(buildContext).compileProjectAndTests(["intellij.platform.jps.build"])
20   }
21
22   void buildFullUpdater() {
23     def tasks = BuildTasks.create(buildContext)
24     tasks.compileModules(["updater"])
25     tasks.buildFullUpdaterJar()
26   }
27
28   void buildIntelliJCore(boolean compileModules = true) {
29     def builder = new IntelliJCoreArtifactsBuilder(buildContext)
30     if (compileModules) {
31       builder.compileModules()
32     }
33     builder.layoutIntelliJCore()
34   }
35
36   void buildDistributions() {
37     def tasks = BuildTasks.create(buildContext)
38     tasks.buildDistributions()
39     buildContext.messages.block("Build standalone JPS") {
40       String jpsArtifactDir = "$buildContext.paths.artifacts/jps"
41       new CommunityStandaloneJpsBuilder(buildContext).layoutJps(jpsArtifactDir, buildContext.fullBuildNumber, {})
42     }
43     tasks.buildUpdaterJar()
44   }
45
46   void buildUnpackedDistribution(String targetDirectory) {
47     BuildTasks.create(buildContext).buildUnpackedDistribution(targetDirectory, false)
48   }
49 }