build scripts cleanup: obsolete unused methods from layouts.gant files are removed
authornik <Nikolay.Chashnikov@jetbrains.com>
Tue, 25 Oct 2016 07:32:41 +0000 (10:32 +0300)
committernik <Nikolay.Chashnikov@jetbrains.com>
Tue, 25 Oct 2016 07:45:21 +0000 (10:45 +0300)
build/scripts/layouts.gant

index 2315313db58a081261fa1c4ff0b988979b158041..c21cd738319a0348ad89778e1d4e578c49d7a496 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
-import org.jetbrains.intellij.build.*
-import org.jetbrains.intellij.build.impl.BuildTasksImpl
-import org.jetbrains.jps.util.JpsPathUtil
-
 import static org.jetbrains.jps.idea.IdeaProjectLoader.guessHome
 
 includeTargets << new File("${guessHome(this)}/build/scripts/utils.gant")
 
-/**
- * @deprecated use 'update-from-sources' from dist.gant instead
- */
-target('default': "Developers update") {
-  //when IDEA CE is updated from IDEA UE sources project should be loaded from IDEA UE directory
-  String projectHome = isDefined("devIdeaHome") ? devIdeaHome : home
-  def options = new BuildOptions()
-  options.useCompiledClassesFromProjectOutput = true
-  def context = BuildContext.createContext(ant, projectBuilder, project, global, home, projectHome, new IdeaCommunityProperties(home),
-                                           ProprietaryBuildTools.DUMMY, options)
-  context.paths.distAll = deploy
-  layoutFull(context)
-}
-
-boolean setPluginAndIDEVersionInPluginXml() {
-  return !isDefined("productProperties") || productProperties.setPluginAndIDEVersionInPluginXml
-}
-
-List<String> getExcludedPlugins() {
-  return []
-}
-
-/**
- * @deprecated this method isn't called anymore, it's temporary left for compatibility only; modify {@link org.jetbrains.intellij.build.IdeaCommunityProperties} instead
- */
-def layoutFull(BuildContext context) {
-  binding.setVariable("productProperties", context.productProperties)
-  String home = context.paths.communityHome
-  String targetDirectory = context.paths.distAll
-  File patchedApplicationInfo = ((BuildTasksImpl)BuildTasks.create(context)).patchApplicationInfo()
-  projectBuilder.stage("layout to $targetDirectory")
-
-  List<String> jpsCommonModules = ["jps-model-impl", "jps-model-serialization"]
-  List<String> openapiModules = [platformApiModules,
-    "compiler-openapi",
-    "debugger-openapi",
-    "dom-openapi",
-    "execution-openapi",
-    "java-analysis-api",
-    "java-indexing-api",
-    "java-psi-api",
-    "jsp-openapi",
-    "jsp-base-openapi",
-    "openapi",
-    "remote-servers-java-api",
-    "testFramework-java",
-  ].flatten()
-
-  List<String> implementationModules = [platformImplementationModules,
-    "compiler-impl",
-    "debugger-impl",
-    "dom-impl",
-    "duplicates-analysis",
-    "execution-impl",
-    "external-system-impl",
-    "idea-ui",
-    "java-analysis-impl",
-    "java-indexing-impl",
-    "java-impl",
-    "java-psi-impl",
-    "java-structure-view",
-    "jsp-spi",
-    "manifest",
-    "platform-main",
-    "remote-servers-java-impl",
-    "structuralsearch",
-    "structuralsearch-java",
-    "testFramework",
-    "tests_bootstrap",
-    "typeMigration",
-    "ui-designer-core",
-  ].flatten()
-  implementationModules.removeAll(jpsCommonModules) //todo[nik] remove jps modules from platformImplementationModules instead and update layouts of minor IDEs accordingly
-
-  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("jps-plugin-system.jar") {
-          module("jps-plugin-system")
-        }
-      }
-
-      dir("libpty") {
-        fileset(dir: "$home/lib/libpty") {
-          exclude(name: "readme.txt")
-        }
-      }
-
-      jar("util.jar") {
-        module("util")
-        module("util-rt")
-      }
-
-      jar("openapi.jar") {
-        openapiModules.each { module it}
-      }
-
-      jar("annotations.jar") {
-        module("annotations-common")
-        module("annotations")
-      }
-      jar("jdkAnnotations.jar") {
-        fileset(dir: "${home}/java/jdkAnnotations")
-      }
-
-      jar("extensions.jar") { module("extensions")}
-
-      jar("external-system-rt.jar") { module("external-system-rt")}
-
-      jar([name: "idea.jar", duplicate: "preserve"]) {
-        implementationModules.each { module it}
-      }
-
-      jar("bootstrap.jar") { module("bootstrap") }
-
-      jar("jps-launcher.jar") { module("jps-launcher") }
-
-      jar("resources.jar") {
-        module("colorSchemes")
-        module("resources")
-        module("platform-resources")
-
-        def appInfoModule = context.productProperties.applicationInfoModule
-        if ("community-resources" == appInfoModule) {
-          module("community-resources") {
-            if (patchedApplicationInfo != null) {
-              exclude(name: "idea/$patchedApplicationInfo.name")
-            }
-          }
-        } else {
-          module("community-resources")
-          module(appInfoModule) {
-            if (patchedApplicationInfo != null) {
-              exclude(name: "idea/$patchedApplicationInfo.name")
-            }
-          }
-        }
-        if (patchedApplicationInfo != null) {
-          dir("idea") {
-            fileset(file: patchedApplicationInfo.path)
-          }
-        }
-      }
-
-      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")
-        module("instrumentation-util-8")
-        module("javac-ref-scanner-8")
-      }
-
-      jar("jps-model.jar") {
-        jpsCommonModules.each { module it }
-      }
-      jar("jps-builders.jar") {
-        module("jps-builders")
-      }
-
-      fileset(dir: "$home/jps/lib") {
-        include(name: "optimizedFileManager.jar")
-      }
-
-      fileset(dir: "$home/lib", includesfile: "${home}/lib/required_for_dist.txt")
-
-      fileset(dir: "$home/build/kotlinc/lib") {
-        include(name: "kotlin-runtime.jar")
-        include(name: "kotlin-reflect.jar")
-      }
-
-      fileset(dir: "$home/xml/relaxng/lib", includes: "*.jar")
-
-      dir("ant") {
-        fileset(dir: "$home/lib/ant") {
-          exclude(name: "**/src/**")
-        }
-      }
-    }
-
-    dir("redist") {
-      jar("annotations-java8.jar") {
-        module("annotations-common")
-        module("annotations-java8")
-      }
-    }
-
-    layoutCommunityPlugins(home, context)
-
-    dir("plugins") {
-      dir("javaFX") {
-        dir("lib") {
-          jar("javaFX.jar") {
-            noResources("javaFX")
-            noResources("javaFX-CE")
-          }
-          resources(["javaFX", "javaFX-CE"])
-          jar("javaFX-jps-plugin.jar") {
-            module("javaFX-jps-plugin")
-          }
-          jar("common-javaFX-plugin.jar") {
-            module("common-javaFX-plugin")
-          }
-          fileset(dir: "${home}/plugins/javaFX/lib", includes: "SceneBuilderKit-8.1.1.jar");
-        }
-      }
-    }
-
-    dir("plugins") {
-      dir("IntelliLang") {
-        dir("lib") {
-          jar("IntelliLang.jar") {
-            module("IntelliLang")
-            module("IntelliLang-java")
-            module("IntelliLang-xml")
-          }
-          jar("intellilang-jps-plugin.jar") {
-            module("intellilang-jps-plugin")
-          }
-        }
-      }
-    }
-  }
-
-  reorder(home, targetDirectory)
-  return info
-}
-
-/**
- * @deprecated this method isn't used in new build scripts (it's still used in CLion and AppCode build scripts which aren't rewritten yet and
- * in third-party products); specify non-trivial layout of plugins in {@link org.jetbrains.intellij.build.CommunityRepositoryModules} instead
- */
-public def layoutCommunityPlugins(String home, BuildContext buildContext = null) {
-  if (!isDefined("pluginFilter") || pluginFilter.contains("android")) {
-    if (buildContext == null) {
-      projectBuilder.error("Cannot build Android plugin: buildContext isn't defined")
-    }
-    def androidModule = buildContext.findModule("android")
-    def sdklibModule = buildContext.findModule("sdklib")
-    if (androidModule == null) projectBuilder.error("Cannot build Android plugin: 'android' module isn't included into the project")
-    if (sdklibModule == null) projectBuilder.error("Cannot build Android plugin: 'sdklib' module isn't included into the project")
-
-    def androidHome = JpsPathUtil.urlToPath(androidModule.contentRootsList.urls.first())
-    def androidToolsBaseHome = JpsPathUtil.urlToFile(sdklibModule.contentRootsList.urls.first()).parentFile.canonicalPath
-    [androidHome, androidToolsBaseHome].each {
-      if (!new File(it).exists()) projectBuilder.error("Cannot build Android plugin: $it doesn't exist")
-    }
-    layoutAndroid(androidHome, androidToolsBaseHome)
-  }
-
-  dir("plugins") {
-    def simplePlugins = ["copyright", "java-i18n", "hg4idea", "github"] //, "tasks-time-tracking"]
-
-    simplePlugins.each {
-      layoutPlugin it
-    }
-
-    layoutPlugin("ant", "ant", "antIntegration") {
-      jar("ant-jps-plugin.jar") {
-        module("ant-jps-plugin")
-      }
-    }
-    layoutPlugin("uiDesigner", "ui-designer", "uiDesigner") {
-      dir("jps") {
-        jar("ui-designer-jps-plugin.jar") {
-          module("ui-designer-jps-plugin")
-        }
-      }
-    }
-
-    pluginDir("properties") {
-      dir("lib") {
-        jar("properties.jar") {
-          module("properties-psi-api")
-          module("properties-psi-impl")
-          module("properties")
-        }
-      }
-    }
-
-    layoutPlugin("maven") {
-      jar("maven-jps-plugin.jar") {
-        module("maven-jps-plugin")
-      }
-      jar("aether-dependency-resolver.jar") {
-        module("aether-dependency-resolver")
-      }
-      jar("maven-server-api.jar") {
-        module("maven-server-api")
-      }
-      jar("maven2-server-impl.jar") {
-        module("maven2-server-impl")
-      }
-      jar("maven3-server-common.jar") {
-        module("maven3-server-common")
-      }
-      jar("maven30-server-impl.jar") {
-        module("maven30-server-impl")
-      }
-      jar("maven3-server-impl.jar") {
-        module("maven3-server-impl")
-      }
-
-      jar("artifact-resolver-m2.jar") {
-        module("maven-artifact-resolver-m2")
-        module("maven-artifact-resolver-common")
-      }
-
-      jar("artifact-resolver-m3.jar") {
-        module("maven-artifact-resolver-m3")
-        module("maven-artifact-resolver-common")
-      }
-
-      jar("artifact-resolver-m31.jar") {
-        module("maven-artifact-resolver-m31")
-        module("maven-artifact-resolver-common")
-      }
-
-      dir("maven3-server-lib") {
-        fileset(dir: "$home/plugins/maven/maven3-server-common/lib") {include(name: "*.jar")}
-      }
-      dir("maven3") {
-        fileset(dir: "$home/plugins/maven/maven3-server-impl/lib/maven3")
-      }
-
-      dir("maven2-server-lib") {
-        fileset(dir: "$home/lib/") { include(name: "jaxb*.jar")}
-        fileset(dir: "$home/plugins/maven/maven2-server-impl/lib") {include(name: "*.jar")}
-      }
-      dir("maven2") {
-        fileset(dir: "$home/plugins/maven/maven2-server-impl/lib/maven2")
-      }
-
-      fileset(dir: "$home/plugins/maven/lib")
-      fileset(dir: "$home/plugins/maven/maven-server-api/lib")
-    }
-
-    layoutPlugin("gradle") {
-      jar("gradle-jps-plugin.jar") {
-        module("gradle-jps-plugin")
-      }
-
-      jar("gradle-tooling-extension-api.jar") {
-        module("gradle-tooling-extension-api")
-      }
-
-      jar("gradle-tooling-extension-impl.jar") {
-        module("gradle-tooling-extension-impl")
-      }
-      fileset(dir: "$home/plugins/gradle/lib") { include(name: "*.jar") }
-      // add kryo lib
-      fileset(dir: "$home/lib/") {
-        include(name: "kryo-*.jar")
-        include(name: "reflectasm-*.jar")
-        include(name: "objenesis-*.jar")
-        include(name: "minlog-*.jar")
-      }
-    }
-
-    layoutPlugin("git4idea") {
-      jar("git4idea-rt.jar") {
-        module("git4idea-rt")
-      }
-      jar("remote-servers-git.jar") {
-        moduleOptional("remote-servers-git")
-        moduleOptional("remote-servers-git-java")
-      }
-      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")
-      }
-    }
-
-    layoutPlugin("svn4idea") {
-      fileset(dir: "$home/plugins/svn4idea/lib") {
-        exclude(name: "svnkitsrc.zip")
-        exclude(name: "sqljetsrc.zip")
-        exclude(name: "svnkit-javahl16.zip")
-        exclude(name: "trileadsrc.zip")
-      }
-    }
-
-    layoutPlugin("junit", "junit", "idea-junit") {
-      jar("junit-rt.jar") {
-        module("junit_rt")
-      }
-      jar("junit5-rt.jar") {
-        module("junit5_rt")
-      }
-      fileset(dir: "$home/plugins/junit5_rt/lib") {
-        include(name: "*.jar")
-      }
-    }
-
-    pluginDir("ByteCodeViewer") {
-      dir("lib") {
-        jar("byteCodeViewer.jar") {
-          noResources("ByteCodeViewer")
-        }
-      }
-    }
-
-    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")
-          include(name: "jcommander.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")
-          module("groovy-psi") {
-            exclude(name: "standardDsls/**")
-          }
-          module("structuralsearch-groovy")
-        }
-        //layout of groovy jars must be consistent with GroovyBuilder.getGroovyRtRoot method
-        jar("groovy-jps-plugin.jar") {
-          module("groovy-jps-plugin")
-        }
-        jar("groovy_rt.jar") {
-          module("groovy_rt")
-        }
-        jar("groovy-rt-constants.jar") {
-          module("groovy-rt-constants")
-        }
-        dir("standardDsls") {
-          fileset(dir: "$home/plugins/groovy/groovy-psi/resources/standardDsls")
-        }
-        dir("agent") {
-          fileset(dir: "${home}/plugins/groovy/hotswap") {
-            include(name: "gragent.jar")
-          }
-        }
-
-
-        fileset(dir: "$home/plugins/groovy/groovy-psi/resources/conf")
-      }
-    }
-
-    pluginDir("tasks") {
-      dir("lib") {
-        jar("tasks-api.jar") { module("tasks-api") }
-        jar("jira.jar") { module("jira") }
-        jar("tasks-core.jar") { module("tasks-core") }
-        jar("jira.jar") { module("jira") }
-        jar("tasks-java.jar") { moduleOptional("tasks-java") }
-        fileset(dir: "${home}/plugins/tasks/tasks-core/lib") {
-          include(name: "**/*.jar")
-        }
-      }
-    }
-
-    layoutPlugin("devkit") {
-      jar("devkit-jps-plugin.jar") {
-        module("devkit-jps-plugin")
-      }
-      fileset(dir: "${home}/plugins/devkit/lib") {
-        include(name: "**/*.jar")
-      }
-    }
-    layoutPlugin("eclipse") {
-      jar("eclipse-jps-plugin.jar") {
-        module("eclipse-jps-plugin")
-      }
-      jar("common-eclipse-util.jar") {
-        module("common-eclipse-util")
-      }
-    }
-
-    layoutPlugin("terminal") {
-      fileset(dir: "$home/plugins/terminal/lib") {
-        include(name: "*.jar")
-        include(name: "*.in")
-      }
-    }
-
-    layoutPlugin("editorconfig") {
-      fileset(dir: "$home/plugins/editorconfig/lib") {
-        include(name: "**/*.jar")
-      }
-    }
-
-    pluginDir("coverage") {
-      dir("lib") {
-        jar("coverage.jar") {
-          noResources("coverage-common")
-          noResources("coverage")
-        }
-
-        jar("coverage_rt.jar") {
-          noResources("coverage_rt")
-        }
-
-        jar("resources_en.jar") {
-          module("coverage-common") {
-            patternset(refid: "resources.included")
-          }
-          module("coverage") {
-            patternset(refid: "resources.included")
-          }
-        }
-
-        fileset(dir: "${home}/plugins/coverage/lib", excludes: "**/jacoco_src.zip")
-      }
-    }
-
-    pluginDir("java-decompiler") {
-      dir("lib") {
-        jar("java-decompiler.jar") {
-          module("java-decompiler-engine")
-          module("java-decompiler-plugin")
-        }
-      }
-    }
-
-    pluginDir("Kotlin") {
-      fileset(dir: "${home}/build/kotlinc/plugin/Kotlin")
-    }
-
-    layoutPlugin("settings-repository") {
-      fileset(dir: "$home/plugins/settings-repository/lib", excludes: "**/*-sources.jar,**/*.xml,**/com/**,**/org/**,**/java/**,**/dev/**")
-    }
-
-    pluginDir("yaml") {
-      dir("lib") {
-        jar("yaml.jar") {
-          noResources("yaml")
-          module("yaml")
-        }
-        resources("yaml")
-      }
-    }
-
-  }
-}
-
-def setPluginVersionAndSince(String moduleName, String version) {
-  def file = new File(projectBuilder.moduleOutput(findModule(moduleName)) + "/META-INF/plugin.xml")
-  if (file.isFile()) {
-    def text = file.text
-    if (!text.contains("<version>")) {
-      def dotIndex = version.indexOf('.')
-      def untilBuild = dotIndex > 0 ? Integer.parseInt(version.substring(0, dotIndex)) + ".*" : version
-      def anchor = text.contains("</id>") ? "</id>" : "</name>"
-      file.text = text.replace(anchor, "${anchor}\n  <version>${version}</version>\n  <idea-version since-build=\"${version}\" until-build=\"${untilBuild}\"/>\n")
-    }
-  }
-}
-
-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
-  }
-
-  def excludedPlugins = getExcludedPlugins()
-  if (excludedPlugins.contains(moduleName) || excludedPlugins.contains(pluginName)) {
-    return
-  }
-
-  if (setPluginAndIDEVersionInPluginXml()) {
-    def version = requireProperty("buildNumber", requireProperty("build.number", snapshot))
-    //do not set 'until-build' for snapshot builds compiled locally. Otherwise if you build from sources of e.g. 145 branch you'll get
-    // 'until-build=146.0' in plugin.xml in module outputs and won't be able to run IDE from sources of 'master' branch.
-    if (!version.toLowerCase().endsWith("snapshot")) {
-      setPluginVersionAndSince(moduleName, version)
-    }
-  }
-
-  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
-  }
-
-  def excludedPlugins = getExcludedPlugins()
-  if (excludedPlugins.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) {
-  projectBuilder.info("Reordering JARs in $targetDirectory")
-  ant.java(classname: "com.intellij.util.io.zip.ReorderJarsMain", fork: true, failonerror: true) {
-    arg(value: "${home}/build/order.txt")
-    arg(value: targetDirectory)
-    arg(value: targetDirectory)
-    arg(value: "${home}/lib")
-    classpath {
-      projectBuilder.moduleRuntimeClasspath(findModule("util"), false).each {
-        pathelement(location: it)
-      }
-    }
-  }
-}
-
-/**
- * @deprecated this method isn't used in new build scripts (it's still used in Android Studio build scripts which aren't rewritten yet);
- * layout of Android plugin in specified in {@link org.jetbrains.intellij.build.CommunityRepositoryModules}
- */
-def layoutAndroid(String androidHome, String androidToolsBaseHome) {
-  dir("plugins") {
-    layoutPlugin("android") {
-      fileset(dir: "$androidHome/lib") {
-        include(name: "**/*.jar")
-        exclude(name: "**/fest-*.jar")
-        exclude(name: "src/*.jar")
-      }
-
-      jar("android-common.jar") {
-        module("android-common")
-      }
-
-      jar("android-rt.jar") {
-        module("android-rt")
-      }
-
-      jar("common.jar") {
-        module("common")
-      }
-      jar("sdklib.jar") {
-        module("sdklib")
-      }
-      jar("sdk-common.jar") {
-        module("sdk-common")
-      }
-      jar("layoutlib-api.jar") {
-        module("layoutlib-api")
-      }
-      jar("manifest-merger.jar") {
-        module("manifest-merger")
-      }
-      jar("repository.jar") {
-        module("repository")
-      }
-      jar("sdk-tools.jar") {
-        module("assetstudio")
-        module("ddmlib")
-        module("dvlib")
-        module("draw9patch")
-        module("lint-api")
-        module("lint-checks")
-        module("ninepatch")
-        module("perflib")
-        module("rpclib")
-        module("chartlib")
-        module("builder-model")
-        module("builder-test-api")
-        module("instant-run-common")
-        module("instant-run-client")
-        module("instant-run-runtime")
-      }
-      jar("androidAnnotations.jar") {
-        fileset(dir: "$androidHome/annotations")
-      }
-      dir("jps") {
-        jar("android-gradle-jps.jar") { module("android-gradle-jps") }
-      }
-      dir("device-art-resources") {
-        fileset(dir: "$androidHome/device-art-resources")
-      }
-
-      dir("jps") {
-        jar("android-jps-plugin.jar") { module("android-jps-plugin") }
-      }
-      dir("templates") {
-        fileset(dir: "$androidToolsBaseHome/templates")
-      }
-    }
-  }
-}
-
 def layoutJps(String home, String targetDir, String buildNumber, Closure additionalJars) {
   layout(targetDir) {
     zip("standalone-jps-${buildNumber}.zip") {