mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
573 lines
15 KiB
Plaintext
573 lines
15 KiB
Plaintext
/*
|
|
* Copyright 2000-2012 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.
|
|
*/
|
|
import static org.jetbrains.jps.idea.IdeaProjectLoader.guessHome
|
|
|
|
includeTargets << new File("${guessHome(this)}/build/scripts/utils.gant")
|
|
|
|
target('default': "Developers update") {
|
|
def patchedDescriptorDir = patchAppDescriptor(deploy)
|
|
layoutFull(home, deploy, patchedDescriptorDir)
|
|
ant.delete(dir: patchedDescriptorDir)
|
|
}
|
|
|
|
String appInfoFileName() {
|
|
return "idea/IdeaApplicationInfo.xml"
|
|
}
|
|
|
|
String patchAppDescriptor(String targetDirectory) {
|
|
def patchedDirectory = "${targetDirectory}/../patched"
|
|
|
|
ant.delete(dir: patchedDirectory)
|
|
|
|
layout(patchedDirectory) {
|
|
module("community-resources") {
|
|
include(name: appInfoFileName())
|
|
}
|
|
}
|
|
|
|
ant.replace(file: "$patchedDirectory/${appInfoFileName()}", token: "__BUILD_NUMBER__", value: "IC-$snapshot")
|
|
ant.replace(file: "$patchedDirectory/${appInfoFileName()}", token: "__BUILD_DATE__", value: new Date().format("yyyyMMddHHmm"))
|
|
|
|
return patchedDirectory
|
|
}
|
|
|
|
def layoutFull(String home, String targetDirectory, String patchedDescriptorDir = null) {
|
|
project.stage("layout to $targetDirectory")
|
|
|
|
//noinspection GroovyAssignabilityCheck
|
|
List<String> openapiModules = [platformApiModules,
|
|
"java-psi-api", "java-indexing-api", "openapi", "testFramework-java", "debugger-openapi", "compiler-openapi", "dom-openapi", "execution-openapi",
|
|
"jsp-openapi", "jsp-base-openapi"].flatten()
|
|
|
|
//noinspection GroovyAssignabilityCheck
|
|
List<String> implementationModules = [platformImplementationModules,
|
|
"testFramework",
|
|
"tests_bootstrap",
|
|
"instrumentation-util",
|
|
"platform-main",
|
|
"java-psi-impl",
|
|
"java-indexing-impl",
|
|
"java-impl",
|
|
"compiler-impl",
|
|
"debugger-impl",
|
|
"dom-impl",
|
|
"execution-impl",
|
|
"jsp-spi",
|
|
"idea-ui"
|
|
].flatten()
|
|
|
|
ant.patternset(id: "resources.included") {
|
|
include(name: "**/*.properties")
|
|
include(name: "fileTemplates/**/*")
|
|
include(name: "inspectionDescriptions/**/*")
|
|
include(name: "intentionDescriptions/**/*")
|
|
include(name: "tips/**/*")
|
|
}
|
|
|
|
ant.patternset(id: "resources.excluded") {
|
|
exclude(name: "**/*.properties")
|
|
exclude(name: "fileTemplates/**/*")
|
|
exclude(name: "fileTemplates")
|
|
exclude(name: "inspectionDescriptions/**/*")
|
|
exclude(name: "inspectionDescriptions")
|
|
exclude(name: "intentionDescriptions/**/*")
|
|
exclude(name: "intentionDescriptions")
|
|
exclude(name: "tips/**/*")
|
|
exclude(name: "tips")
|
|
}
|
|
|
|
def info = layout(targetDirectory) {
|
|
dir("lib") {
|
|
dir("rt") {
|
|
fileset(dir: "${home}/lib/rt", includesfile: "${home}/lib/rt/required_for_dist.txt")
|
|
}
|
|
|
|
jar("util.jar") {
|
|
module("util")
|
|
module("util-rt")
|
|
}
|
|
|
|
jar("openapi.jar") {
|
|
openapiModules.each { module it}
|
|
}
|
|
|
|
jar("annotations.jar") { module("annotations")}
|
|
jar("jdkAnnotations.jar") {
|
|
fileset(dir: "${home}/java/jdkAnnotations")
|
|
}
|
|
|
|
jar("extensions.jar") { module("extensions")}
|
|
|
|
jar("idea.jar") {
|
|
implementationModules.each { module it}
|
|
}
|
|
|
|
jar("bootstrap.jar") { module("bootstrap") }
|
|
|
|
jar("resources.jar") {
|
|
module("resources")
|
|
module("platform-resources")
|
|
module("community-resources") {
|
|
if (patchedDescriptorDir != null) {
|
|
exclude(name: appInfoFileName())
|
|
}
|
|
}
|
|
if (patchedDescriptorDir != null) {
|
|
fileset(dir: patchedDescriptorDir)
|
|
}
|
|
}
|
|
|
|
jar("idea_rt.jar") { module("java-runtime")}
|
|
|
|
jar("forms_rt.jar") {
|
|
module("forms_rt")
|
|
module("forms-compiler")
|
|
}
|
|
|
|
jar("resources_en.jar") {
|
|
module("resources-en")
|
|
module("platform-resources-en")
|
|
}
|
|
|
|
jar("icons.jar") { module("icons") }
|
|
jar("boot.jar") { module("boot") }
|
|
|
|
jar("javac2.jar") {
|
|
module("javac2")
|
|
module("forms-compiler")
|
|
module("forms_rt")
|
|
module("instrumentation-util")
|
|
}
|
|
|
|
jar("jps-server.jar") {
|
|
module("jps-builders")
|
|
module("jps-model")
|
|
}
|
|
|
|
fileset(dir: "$home/jps/lib") {
|
|
include(name: "optimizedFileManager.jar")
|
|
}
|
|
|
|
fileset(dir: "$home/lib", includesfile: "${home}/lib/required_for_dist.txt")
|
|
|
|
fileset(dir: "$home/lib/src") {
|
|
include(name: "trove4j_changes.txt")
|
|
include(name: "trove4j_src.jar")
|
|
}
|
|
fileset(dir: "$home/xml/relaxng/lib", includes: "*.jar")
|
|
|
|
dir("ant") {
|
|
fileset(dir: "$home/lib/ant") {
|
|
exclude(name: "**/src/**")
|
|
}
|
|
}
|
|
}
|
|
|
|
layoutCommunityPlugins(home)
|
|
|
|
dir("plugins") {
|
|
dir("IntelliLang") {
|
|
dir("lib") {
|
|
jar("IntelliLang.jar") {
|
|
module("IntelliLang")
|
|
module("IntelliLang-java")
|
|
module("IntelliLang-xml")
|
|
module("IntelliLang-javaee")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
printUnusedModules(info.usedModules)
|
|
|
|
//reorder(targetDirectory)
|
|
}
|
|
|
|
public def layoutCommunityPlugins(String home) {
|
|
dir("plugins") {
|
|
def simplePlugins = ["commander", "copyright", "properties", "java-i18n", "eclipse", "hg4idea", "github", "ui-designer-new"]
|
|
|
|
simplePlugins.each {
|
|
layoutPlugin it
|
|
}
|
|
|
|
layoutPlugin("ant", "ant", "antIntegration")
|
|
layoutPlugin("InspectionGadgets", "InspectionGadgetsPlugin")
|
|
layoutPlugin("IntentionPowerPack", "IntentionPowerPackPlugin")
|
|
layoutPlugin("ToString", "generate-tostring", "toString")
|
|
layoutPlugin("uiDesigner", "ui-designer", "uiDesigner")
|
|
|
|
layoutPlugin("maven") {
|
|
jar("maven-server-api.jar") {
|
|
module("maven-server-api")
|
|
}
|
|
jar("maven2-server-impl.jar") {
|
|
module("maven2-server-impl")
|
|
}
|
|
fileset(dir: "$home/plugins/maven/lib")
|
|
fileset(dir: "$home/lib/") { include(name: "jaxb*.jar")}
|
|
fileset(dir: "$home/plugins/maven/maven-server-api/lib")
|
|
fileset(dir: "$home/plugins/maven/maven2-server-impl/lib")
|
|
}
|
|
|
|
layoutPlugin("gradle") {
|
|
jar("gradle.jar") {
|
|
module("gradle")
|
|
}
|
|
}
|
|
|
|
layoutPlugin("rearranger") {
|
|
jar("rearranger.jar") {
|
|
module("rearranger")
|
|
}
|
|
}
|
|
|
|
layoutPlugin("git4idea") {
|
|
jar("git4idea-rt.jar") {
|
|
module("git4idea-rt")
|
|
}
|
|
fileset(dir: "$home/plugins/git4idea/lib") {
|
|
include(name: "trilead-ssh2.jar")
|
|
}
|
|
fileset(dir: "$home/plugins/git4idea/lib/ini4j") {
|
|
include(name: "ini4j*.jar")
|
|
exclude(name: "ini4j*sources.jar")
|
|
}
|
|
fileset(dir: "$home/plugins/git4idea/lib/jgit") {
|
|
include(name: "org.eclipse.jgit*.jar")
|
|
include(name: "jsch*.jar")
|
|
exclude(name: "*.zip")
|
|
}
|
|
}
|
|
|
|
layoutPlugin("svn4idea") {
|
|
fileset(dir: "$home/plugins/svn4idea/lib", excludes: "**/svnkitsrc.zip")
|
|
}
|
|
|
|
layoutPlugin("junit", "junit", "idea-junit") {
|
|
jar("junit-rt.jar") {
|
|
module("junit_rt")
|
|
}
|
|
}
|
|
|
|
pluginDir("cvsIntegration") {
|
|
dir("lib") {
|
|
jar("cvs_util.jar") {noResources("cvs-core")}
|
|
jar("cvsIntegration.jar") {noResources("cvs-plugin")}
|
|
jar("javacvs-src.jar") {noResources("javacvs-src")}
|
|
jar("smartcvs-src.jar") {noResources("smartcvs-src")}
|
|
|
|
resources(["cvs-core", "cvs-plugin", "javacvs-src", "smartcvs-src"])
|
|
|
|
fileset(dir: "${home}/plugins/cvs/lib")
|
|
}
|
|
}
|
|
|
|
pluginDir("testng") {
|
|
dir("lib") {
|
|
jar("testng-plugin.jar") {
|
|
noResources("testng")
|
|
noResources("testng_rt")
|
|
}
|
|
|
|
resources("testng")
|
|
|
|
fileset(dir: "$home/plugins/testng/lib") {
|
|
include(name: "testng.jar")
|
|
}
|
|
}
|
|
}
|
|
|
|
layoutPlugin("xpath") {
|
|
dir("rt") {
|
|
jar("xslt-rt.jar") {module("xslt-rt")}
|
|
}
|
|
}
|
|
|
|
layoutPlugin("xslt-debugger") {
|
|
jar("xslt-debugger-engine.jar") {
|
|
module("xslt-debugger-engine") {
|
|
excludes: "lib"
|
|
}
|
|
}
|
|
fileset(dir: "$home/plugins/xslt-debugger/engine/lib") {
|
|
include(name: "**/rmi-stubs.jar")
|
|
}
|
|
dir("rt") {
|
|
jar("xslt-debugger-engine-impl.jar") {
|
|
module("xslt-debugger-engine-impl") {
|
|
exclude(name: "lib")
|
|
exclude(name: "**/*.jar")
|
|
exclude(name: "**/*.html")
|
|
}
|
|
}
|
|
fileset(dir: "$home/plugins/xslt-debugger/engine/impl/lib") {
|
|
include(name: "**/*.jar")
|
|
exclude(name: "**/rmi-stubs.jar")
|
|
include(name: "**/*.html")
|
|
}
|
|
}
|
|
}
|
|
|
|
pluginDir("Groovy") {
|
|
dir("lib") {
|
|
jar("Groovy.jar") {
|
|
module("jetgroovy") {
|
|
exclude(name: "standardDsls/**")
|
|
}
|
|
}
|
|
|
|
jar("groovy_rt.jar") {module("groovy_rt")}
|
|
dir("standardDsls") {
|
|
fileset(dir: "$home/plugins/groovy/resources/standardDsls")
|
|
}
|
|
dir("agent") {
|
|
fileset(dir: "${home}/plugins/groovy/hotswap") {
|
|
include(name: "gragent.jar")
|
|
}
|
|
}
|
|
|
|
|
|
fileset(dir: "$home/plugins/groovy/resources/conf")
|
|
}
|
|
}
|
|
|
|
pluginDir("tasks") {
|
|
dir("lib") {
|
|
jar("tasks-api.jar") { module("tasks-api") }
|
|
jar("tasks-core.jar") { module("tasks-core") }
|
|
jar("jira-connector.jar") { module("jira-connector") }
|
|
jar("tasks-java.jar") { moduleOptional("tasks-java") }
|
|
fileset(dir: "${home}/plugins/tasks/tasks-core/lib") {
|
|
include(name: "**/*.jar")
|
|
}
|
|
}
|
|
}
|
|
|
|
layoutPlugin("devkit") {
|
|
dir("jps") {
|
|
jar("devkit-jps-plugin.jar") {
|
|
module("devkit-jps-plugin")
|
|
}
|
|
}
|
|
}
|
|
|
|
layoutPlugin("android") {
|
|
fileset(dir: "${home}/plugins/android/lib") {
|
|
include(name: "**/*.jar")
|
|
exclude(name: "**/ddmlib_1.jar")
|
|
}
|
|
|
|
jar("android-common.jar") {
|
|
module("android-common")
|
|
}
|
|
|
|
jar("android-rt.jar") {
|
|
module("android-rt")
|
|
}
|
|
|
|
dir("jps") {
|
|
jar("android-jps-plugin.jar") { module("android-jps-plugin") }
|
|
}
|
|
}
|
|
|
|
layoutPlugin("android-designer") {
|
|
jar("android-designer.jar") {
|
|
module("android-designer")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
def layoutPlugin(String moduleName) {
|
|
layoutPlugin(moduleName, moduleName, {})
|
|
}
|
|
|
|
def layoutPlugin(String moduleName, Closure custom) {
|
|
layoutPlugin(moduleName, moduleName, custom)
|
|
}
|
|
|
|
def layoutPlugin(String pluginName, String moduleName) {
|
|
layoutPlugin(pluginName, moduleName, {})
|
|
}
|
|
|
|
def layoutPlugin(String pluginName, String moduleName, Closure custom) {
|
|
layoutPlugin(pluginName, moduleName, pluginName, custom)
|
|
}
|
|
|
|
def layoutPlugin(String pluginName, String moduleName, String jarName) {
|
|
layoutPlugin(pluginName, moduleName, jarName, {})
|
|
}
|
|
|
|
def layoutPlugin(String pluginName, String moduleName, String jarName, Closure custom) {
|
|
if (isDefined("pluginFilter")) {
|
|
if (!pluginFilter.contains(moduleName) && !pluginFilter.contains(pluginName)) return
|
|
}
|
|
|
|
dir(pluginName) {
|
|
dir("lib") {
|
|
jar("${jarName}.jar") {
|
|
noResources(moduleName)
|
|
}
|
|
|
|
resources(moduleName)
|
|
custom()
|
|
}
|
|
}
|
|
}
|
|
|
|
def pluginDir(String dirName, Closure initializer) {
|
|
if (isDefined("pluginFilter")) {
|
|
if (!pluginFilter.contains(dirName)) return
|
|
}
|
|
|
|
dir(dirName) {
|
|
initializer()
|
|
}
|
|
}
|
|
|
|
private def resources(List<String> modules) {
|
|
jar("resources_en.jar") {
|
|
modules.each {
|
|
module(it) {
|
|
patternset(refid: "resources.included")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private def resources(String moduleName) {
|
|
jar("resources_en.jar") {
|
|
module(moduleName) {
|
|
patternset(refid: "resources.included")
|
|
}
|
|
}
|
|
}
|
|
|
|
private def noResources(String moduleName) {
|
|
module(moduleName) {
|
|
patternset(refid: "resources.excluded")
|
|
}
|
|
}
|
|
|
|
def moduleOptional(String name) {
|
|
if (isDefined("pluginFilter")) {
|
|
if (!pluginFilter.contains(name)) return
|
|
}
|
|
|
|
module(name)
|
|
}
|
|
|
|
def moduleOptional(String name, Closure init) {
|
|
if (isDefined("pluginFilter")) {
|
|
if (!pluginFilter.contains(name)) return
|
|
}
|
|
|
|
module(name, init)
|
|
}
|
|
|
|
def reorder(String home, String targetDirectory) {
|
|
if (isDefined("util")) {
|
|
ant.java(classname: "com.intellij.util.io.zip.ReorderJarsMain", fork: "true") {
|
|
arg(value: "$home/build/order.txt")
|
|
arg(value: targetDirectory)
|
|
arg(value: targetDirectory)
|
|
arg(value: "$home/lib")
|
|
classpath {
|
|
pathelement(location: util.output)
|
|
pathelement(location: getProperty('util-rt').output)
|
|
pathelement(location: "$home/lib/jna.jar")
|
|
pathelement(location: "$home/lib/trove4j.jar")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
def layout_core(String home, String target) {
|
|
layout(target) {
|
|
jar("intellij-core.jar") {
|
|
module("util-rt")
|
|
module("util")
|
|
module("core-api")
|
|
module("core-impl")
|
|
module("boot")
|
|
module("extensions")
|
|
module("java-psi-api")
|
|
module("java-psi-impl")
|
|
}
|
|
|
|
jar("annotations.jar") {
|
|
module("annotations")
|
|
}
|
|
|
|
fileset(dir: "$home/lib") {
|
|
include(name: "guava-12.0.jar")
|
|
include(name: "picocontainer.jar")
|
|
include(name: "trove4j.jar")
|
|
include(name: "asm.jar")
|
|
include(name: "asm-commons.jar")
|
|
include(name: "cli-parser-1.1.jar")
|
|
}
|
|
}
|
|
}
|
|
|
|
def layout_core_upsource(String home, String target) {
|
|
layout(target) {
|
|
jar("intellij-core-upsource.jar") {
|
|
module("util-rt")
|
|
module("util")
|
|
module("core-api")
|
|
module("core-impl")
|
|
module("boot")
|
|
module("extensions")
|
|
module("indexing-api")
|
|
module("indexing-impl")
|
|
module("java-psi-api")
|
|
module("java-psi-impl")
|
|
module("projectModel-api")
|
|
module("projectModel-impl")
|
|
module("jps-model-api")
|
|
module("jps-model-impl")
|
|
module("jps-model-serialization")
|
|
module("java-indexing-api")
|
|
module("java-indexing-impl")
|
|
module("platform-resources")
|
|
module("platform-resources-en")
|
|
}
|
|
|
|
jar("annotations.jar") {
|
|
module("annotations")
|
|
}
|
|
|
|
fileset(dir: "$home/lib") {
|
|
include(name: "guava-12.0.jar")
|
|
include(name: "picocontainer.jar")
|
|
include(name: "trove4j.jar")
|
|
include(name: "asm.jar")
|
|
include(name: "asm-commons.jar")
|
|
include(name: "asm4-all.jar")
|
|
include(name: "cli-parser-1.1.jar")
|
|
include(name: "jna.jar")
|
|
include(name: "log4j.jar")
|
|
include(name: "xstream.jar")
|
|
include(name: "xpp3-1.1.4-min.jar")
|
|
include(name: "jdom.jar")
|
|
}
|
|
}
|
|
}
|