From 0dbb083b87c36032850fe8a9bc7ba8afd1a4e419 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 3 Jan 2019 18:36:11 +0100 Subject: [PATCH] Cleanup (formatting) --- .../build/IntelliJCoreArtifactsBuilder.groovy | 39 +++++++------------ 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/build/groovy/org/jetbrains/intellij/build/IntelliJCoreArtifactsBuilder.groovy b/build/groovy/org/jetbrains/intellij/build/IntelliJCoreArtifactsBuilder.groovy index 74e620caf972..c2be5a4bd40c 100644 --- a/build/groovy/org/jetbrains/intellij/build/IntelliJCoreArtifactsBuilder.groovy +++ b/build/groovy/org/jetbrains/intellij/build/IntelliJCoreArtifactsBuilder.groovy @@ -1,21 +1,8 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// 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. package org.jetbrains.intellij.build import org.jetbrains.intellij.build.impl.LayoutBuilder + /** * Builds artifacts which are used in Kotlin Compiler and UpSource * @@ -59,6 +46,14 @@ class IntelliJCoreArtifactsBuilder { "intellij.xml.structureView.impl", "intellij.jvm.analysis.impl", ] + private static final List VERSIONED_LIBRARIES = [ + "ASM", "Guava", "picocontainer", "Trove4j", "cli-parser", "lz4-java", "imgscalr", "batik", "xmlgraphics-commons", + "OroMatcher", "jna", "Log4J", "StreamEx", "Java Compatibility" + ] + private static final List UNVERSIONED_LIBRARIES = [ + "jetbrains-annotations-java5", "JDOM" + ] + private final BuildContext buildContext IntelliJCoreArtifactsBuilder(BuildContext buildContext) { @@ -74,7 +69,7 @@ class IntelliJCoreArtifactsBuilder { String coreArtifactDir = "$buildContext.paths.artifacts/core" AntBuilder ant = buildContext.ant ant.mkdir(dir: coreArtifactDir) - String home = buildContext.paths.communityHome + List analysisModules = ANALYSIS_API_MODULES + ANALYSIS_IMPL_MODULES new LayoutBuilder(buildContext, false).layout(coreArtifactDir) { jar("intellij-core.jar") { @@ -91,14 +86,8 @@ class IntelliJCoreArtifactsBuilder { analysisModules.each { module it } } - [ - "ASM", "Guava", "picocontainer", "Trove4j", "cli-parser", "lz4-java", "imgscalr", "batik", "xmlgraphics-commons", - "OroMatcher", "jna", "Log4J", "StreamEx", "Java Compatibility" - ].each { - projectLibrary(it) - } - projectLibrary("jetbrains-annotations-java5", true) - projectLibrary("JDOM", true) + VERSIONED_LIBRARIES.each { projectLibrary(it) } + UNVERSIONED_LIBRARIES.each { projectLibrary(it, true) } } ant.move(file: "$coreArtifactDir/annotations-java5.jar", tofile: "$coreArtifactDir/annotations.jar") buildContext.notifyArtifactBuilt(coreArtifactDir) @@ -110,4 +99,4 @@ class IntelliJCoreArtifactsBuilder { buildContext.notifyArtifactBuilt(intellijCoreZip) } } -} +} \ No newline at end of file