From 2fb4cff77c0eb43d98e604123a4ade91a6d27843 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 27 Sep 2012 12:53:12 +0200 Subject: [PATCH] Common building code extracted --- python/build/pycharm_build.gant | 34 ++------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/python/build/pycharm_build.gant b/python/build/pycharm_build.gant index b2987fd75847..b633c627c59d 100644 --- a/python/build/pycharm_build.gant +++ b/python/build/pycharm_build.gant @@ -127,37 +127,7 @@ target('default': "Build artifacts") { zipSources(home, paths.artifacts) - def usedJars = new HashSet(); - - def forbiddenJars = ["client-api", "ideaLicenseDecoder", "eawtstub.jar", "ui.jar", "exe4jlib.jar", "cglib", "jcip-annotations", "/y.jar", "ysvg.jar"] - - projectBuilder.cleanOutput() - modules.each { - def module = findModule(it) - if (module != null) { - projectBuilder.info("Building $module.name") - projectBuilder.moduleRuntimeClasspath(module, false).each { - File file = new File(it) - if (file.exists()) { - String path = file.canonicalPath.replace('\\', '/') - String normalizedHome = home.replace('\\', '/') - if (path.endsWith(".jar") && (path.startsWith("$normalizedHome/lib/") || - path.startsWith("$normalizedHome/community/lib/") || - path.startsWith("$normalizedHome/python/lib") || - path.startsWith("$normalizedHome/plugins/coverage-common/lib") || - path.startsWith("$normalizedHome/community/xml/relaxng/lib")) - && !path.contains("/dev/") && !path.contains("/rt/") && !path.contains("/ant/") - && !forbiddenJars.any { path.contains(it) }) { - usedJars.add(path); - } - } - } - projectBuilder.makeModule(module) - } - else { - projectBuilder.warning("$it is not a module") - } - } + def usedJars = buildModules(modules, ["python/lib", "plugins/coverage-common/lib"]) buildSearchableOptions("${projectBuilder.moduleOutput(findModule("platform-resources"))}/search", ["$home/build/idea.license", "$home/build/pycharm.license"], { projectBuilder.moduleRuntimeClasspath(findModule("python-ide"), false).each { @@ -202,7 +172,6 @@ target('default': "Build artifacts") { buildDmg("pycharm", "${home}/python/build/DMG_background.png") } -// Collect pyCharm plugins private layoutPlugins() { def layouts = includeFile("$home/build/scripts/layouts.gant") @@ -288,6 +257,7 @@ private layoutFull(Map args, String target, Set usedJars) { module("forms_rt") } + //noinspection GroovyAssignabilityCheck jar([name: "resources_en.jar", duplicate: "preserve"]) { // custom resources should go first fileset(dir: "$home/python/resources") {