206a6a91be606c6e41a3b999e1f275f32518c71a
[idea/community.git] / build / scripts / layouts.gant
1 /*
2  * Copyright 2000-2015 JetBrains s.r.o.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 import static org.jetbrains.jps.idea.IdeaProjectLoader.guessHome
17
18 includeTargets << new File("${guessHome(this)}/build/scripts/utils.gant")
19
20 target('default': "Developers update") {
21   def patchedDescriptorDir = patchAppDescriptor(deploy)
22   layoutFull(home, deploy, patchedDescriptorDir)
23   ant.delete(dir: patchedDescriptorDir)
24 }
25
26 String appInfoFileName() {
27   return "idea/IdeaApplicationInfo.xml"
28 }
29
30 String patchAppDescriptor(String targetDirectory) {
31   def patchedDirectory = "${targetDirectory}/../patched"
32
33   ant.delete(dir: patchedDirectory)
34
35   layout(patchedDirectory) {
36     module("community-resources") {
37       include(name: appInfoFileName())
38     }
39   }
40
41   ant.replace(file: "$patchedDirectory/${appInfoFileName()}", token: "__BUILD_NUMBER__", value: "IC-$snapshot")
42   ant.replace(file: "$patchedDirectory/${appInfoFileName()}", token: "__BUILD_DATE__", value: new Date().format("yyyyMMddHHmm"))
43
44   return patchedDirectory
45 }
46
47 def layoutFull(String home, String targetDirectory, String patchedDescriptorDir = null) {
48   projectBuilder.stage("layout to $targetDirectory")
49
50   List<String> jpsCommonModules = ["jps-model-impl", "jps-model-serialization"]
51   List<String> openapiModules = [platformApiModules,
52     "compiler-openapi",
53     "debugger-openapi",
54     "dom-openapi",
55     "execution-openapi",
56     "java-analysis-api",
57     "java-indexing-api",
58     "java-psi-api",
59     "jsp-openapi",
60     "jsp-base-openapi",
61     "openapi",
62     "remote-servers-java-api",
63     "testFramework-java",
64   ].flatten()
65
66   List<String> implementationModules = [platformImplementationModules,
67     "compiler-impl",
68     "debugger-impl",
69     "dom-impl",
70     "duplicates-analysis",
71     "execution-impl",
72     "external-system-impl",
73     "idea-ui",
74     "java-analysis-impl",
75     "java-indexing-impl",
76     "java-impl",
77     "java-psi-impl",
78     "java-structure-view",
79     "jsp-spi",
80     "manifest",
81     "platform-main",
82     "remote-servers-java-impl",
83     "structuralsearch",
84     "structuralsearch-java",
85     "testFramework",
86     "tests_bootstrap",
87     "typeMigration",
88     "ui-designer-core"
89   ].flatten()
90   implementationModules.removeAll(jpsCommonModules) //todo[nik] remove jps modules from platformImplementationModules instead and update layouts of minor IDEs accordingly
91
92   ant.patternset(id: "resources.included") {
93     include(name: "**/*.properties")
94     include(name: "fileTemplates/**/*")
95     include(name: "inspectionDescriptions/**/*")
96     include(name: "intentionDescriptions/**/*")
97     include(name: "tips/**/*")
98   }
99
100   ant.patternset(id: "resources.excluded") {
101     exclude(name: "**/*.properties")
102     exclude(name: "fileTemplates/**/*")
103     exclude(name: "fileTemplates")
104     exclude(name: "inspectionDescriptions/**/*")
105     exclude(name: "inspectionDescriptions")
106     exclude(name: "intentionDescriptions/**/*")
107     exclude(name: "intentionDescriptions")
108     exclude(name: "tips/**/*")
109     exclude(name: "tips")
110   }
111
112   def info = layout(targetDirectory) {
113     dir("lib") {
114       dir("rt") {
115         fileset(dir: "${home}/lib/rt", includesfile: "${home}/lib/rt/required_for_dist.txt")
116         jar("jps-plugin-system.jar") {
117           module("jps-plugin-system")
118         }
119       }
120
121       dir("libpty") {
122         fileset(dir: "$home/lib/libpty") {
123           exclude(name: "readme.txt")
124         }
125       }
126
127       jar("util.jar") {
128         module("util")
129         module("util-rt")
130       }
131
132       jar("openapi.jar") {
133         openapiModules.each { module it}
134       }
135
136       jar("annotations.jar") { module("annotations")}
137       jar("jdkAnnotations.jar") {
138         fileset(dir: "${home}/java/jdkAnnotations")
139       }
140
141       jar("extensions.jar") { module("extensions")}
142
143       jar("idea.jar") {
144         implementationModules.each { module it}
145       }
146
147       jar("bootstrap.jar") { module("bootstrap") }
148
149       jar("jps-launcher.jar") { module("jps-launcher") }
150
151       jar("resources.jar") {
152         module("colorSchemes")
153         module("resources")
154         module("platform-resources")
155         module("community-resources") {
156           if (patchedDescriptorDir != null) {
157             exclude(name: appInfoFileName())
158           }
159         }
160         if (patchedDescriptorDir != null) {
161           fileset(dir: patchedDescriptorDir)
162         }
163       }
164
165       jar("idea_rt.jar") { module("java-runtime")}
166
167       jar("forms_rt.jar") {
168         module("forms_rt")
169         module("forms-compiler")
170       }
171
172       jar("resources_en.jar") {
173         module("resources-en")
174         module("platform-resources-en")
175       }
176
177       jar("icons.jar") { module("icons") }
178       jar("boot.jar") { module("boot") }
179
180       jar("javac2.jar") {
181         module("javac2")
182         module("forms-compiler")
183         module("forms_rt")
184         module("instrumentation-util")
185       }
186
187       jar("jps-model.jar") {
188         jpsCommonModules.each { module it }
189       }
190       jar("jps-server.jar") {
191         module("jps-builders")
192       }
193
194       fileset(dir: "$home/jps/lib") {
195         include(name: "optimizedFileManager.jar")
196       }
197
198       fileset(dir: "$home/lib", includesfile: "${home}/lib/required_for_dist.txt")
199
200       dir("src") {
201         fileset(dir: "$home/lib/src") {
202           include(name: "trove4j_src.jar")
203         }
204       }
205       fileset(dir: "$home/xml/relaxng/lib", includes: "*.jar")
206
207       dir("ant") {
208         fileset(dir: "$home/lib/ant") {
209           exclude(name: "**/src/**")
210         }
211       }
212     }
213
214     layoutCommunityPlugins(home)
215
216     dir("plugins") {
217       dir("javaFX") {
218         dir("lib") {
219           jar("javaFX.jar") {
220             noResources("javaFX")
221             noResources("javaFX-CE")
222           }
223           resources(["javaFX", "javaFX-CE"])
224           jar("javaFX-jps-plugin.jar") {
225             module("javaFX-jps-plugin")
226           }
227           jar("common-javaFX-plugin.jar") {
228             module("common-javaFX-plugin")
229           }
230         }
231
232         fileset(dir: "${home}/plugins/javaFX/FxBuilderEmbedder/lib", includes: "embedder.jar");
233       }
234     }
235
236     dir("plugins") {
237       dir("IntelliLang") {
238         dir("lib") {
239           jar("IntelliLang.jar") {
240             module("IntelliLang")
241             module("IntelliLang-java")
242             module("IntelliLang-xml")
243           }
244           jar("intellilang-jps-plugin.jar") {
245             module("intellilang-jps-plugin")
246           }
247         }
248       }
249     }
250   }
251
252   printUnusedModules(info.usedModules)
253
254   //reorder(targetDirectory)
255   return info
256 }
257
258 public def layoutCommunityPlugins(String home) {
259   if (!isDefined("maySkipAndroidPlugin") || new File("$home/android").exists()) {
260     layoutAndroid("$home/android")
261   }
262   else {
263     projectBuilder.warning("Android plugin sources aren't found at $home/android. Android plugin is excluded from layout.")
264   }
265
266   dir("plugins") {
267     def simplePlugins = ["copyright", "java-i18n", "hg4idea", "github"] //, "tasks-time-tracking"]
268
269     simplePlugins.each {
270       layoutPlugin it
271     }
272
273     layoutPlugin("ant", "ant", "antIntegration") {
274       jar("ant-jps-plugin.jar") {
275         module("ant-jps-plugin")
276       }
277     }
278     layoutPlugin("uiDesigner", "ui-designer", "uiDesigner") {
279       dir("jps") {
280         jar("ui-designer-jps-plugin.jar") {
281           module("ui-designer-jps-plugin")
282         }
283       }
284     }
285
286     pluginDir("properties") {
287       dir("lib") {
288         jar("properties.jar") {
289           module("properties-psi-api")
290           module("properties-psi-impl")
291           module("properties")
292         }
293       }
294     }
295
296     layoutPlugin("maven") {
297       jar("maven-jps-plugin.jar") {
298         module("maven-jps-plugin")
299       }
300       jar("maven-server-api.jar") {
301         module("maven-server-api")
302       }
303       jar("maven2-server-impl.jar") {
304         module("maven2-server-impl")
305       }
306       jar("maven3-server-common.jar") {
307         module("maven3-server-common")
308       }
309       jar("maven30-server-impl.jar") {
310         module("maven30-server-impl")
311       }
312       jar("maven32-server-impl.jar") {
313         module("maven32-server-impl")
314       }
315
316       jar("artifact-resolver-m2.jar") {
317         module("maven-artifact-resolver-m2")
318       }
319
320       jar("artifact-resolver-m3.jar") {
321         module("maven-artifact-resolver-m3")
322         module("maven-artifact-resolver-m2") {
323           include(name: 'org/jetbrains/idea/maven/artifactResolver/common/*')
324         }
325       }
326
327       jar("artifact-resolver-m31.jar") {
328         module("maven-artifact-resolver-m31")
329         module("maven-artifact-resolver-m2") {
330           include(name: 'org/jetbrains/idea/maven/artifactResolver/common/*')
331         }
332       }
333
334       dir("maven3-server-lib") {
335         fileset(dir: "$home/plugins/maven/maven3-server-common/lib") {include(name: "*.jar")}
336       }
337       dir("maven3") {
338         fileset(dir: "$home/plugins/maven/maven30-server-impl/lib/maven3")
339       }
340
341       dir("maven2-server-lib") {
342         fileset(dir: "$home/lib/") { include(name: "jaxb*.jar")}
343         fileset(dir: "$home/plugins/maven/maven2-server-impl/lib") {include(name: "*.jar")}
344       }
345       dir("maven2") {
346         fileset(dir: "$home/plugins/maven/maven2-server-impl/lib/maven2")
347       }
348
349       fileset(dir: "$home/plugins/maven/lib") {exclude(name: "plexus-utils-*") }
350       fileset(dir: "$home/plugins/maven/maven-server-api/lib")
351     }
352
353     layoutPlugin("gradle") {
354       jar("gradle-jps-plugin.jar") {
355         module("gradle-jps-plugin")
356       }
357
358       jar("gradle-tooling-extension-api.jar") {
359         module("gradle-tooling-extension-api")
360       }
361
362       jar("gradle-tooling-extension-impl.jar") {
363         module("gradle-tooling-extension-impl")
364       }
365       fileset(dir: "$home/plugins/gradle/lib") { include(name: "*.jar") }
366       // add kryo lib
367       fileset(dir: "$home/lib/") {
368         include(name: "kryo-*.jar")
369         include(name: "reflectasm-*.jar")
370         include(name: "objenesis-*.jar")
371         include(name: "minlog-*.jar")
372       }
373     }
374
375     layoutPlugin("git4idea") {
376       jar("git4idea-rt.jar") {
377         module("git4idea-rt")
378       }
379       jar("remote-servers-git.jar") {
380         moduleOptional("remote-servers-git")
381       }
382       fileset(dir: "$home/plugins/git4idea/lib") {
383         include(name: "trilead-ssh2.jar")
384       }
385       fileset(dir: "$home/plugins/git4idea/lib/ini4j") {
386         include(name: "ini4j*.jar")
387         exclude(name: "ini4j*sources.jar")
388       }
389     }
390
391     layoutPlugin("svn4idea") {
392       fileset(dir: "$home/plugins/svn4idea/lib", excludes: "**/svnkitsrc.zip")
393     }
394
395     layoutPlugin("junit", "junit", "idea-junit") {
396       jar("junit-rt.jar") {
397         module("junit_rt")
398       }
399     }
400
401     pluginDir("ByteCodeViewer") {
402       dir("lib") {
403         jar("byteCodeViewer.jar") {
404           noResources("ByteCodeViewer")
405         }
406       }
407     }
408
409     pluginDir("cvsIntegration") {
410       dir("lib") {
411         jar("cvs_util.jar") {noResources("cvs-core")}
412         jar("cvsIntegration.jar") {noResources("cvs-plugin")}
413         jar("javacvs-src.jar") {noResources("javacvs-src")}
414         jar("smartcvs-src.jar") {noResources("smartcvs-src")}
415
416         resources(["cvs-core", "cvs-plugin", "javacvs-src", "smartcvs-src"])
417
418         fileset(dir: "${home}/plugins/cvs/lib")
419       }
420     }
421
422     pluginDir("testng") {
423       dir("lib") {
424         jar("testng-plugin.jar") {
425           noResources("testng")
426           noResources("testng_rt")
427         }
428
429         resources("testng")
430
431         fileset(dir: "$home/plugins/testng/lib") {
432           include(name: "testng.jar")
433         }
434       }
435     }
436
437     layoutPlugin("xpath") {
438       dir("rt") {
439         jar("xslt-rt.jar") {module("xslt-rt")}
440       }
441     }
442
443     layoutPlugin("xslt-debugger") {
444       jar("xslt-debugger-engine.jar") {
445         module("xslt-debugger-engine") {
446           excludes: "lib"
447         }
448       }
449       fileset(dir: "$home/plugins/xslt-debugger/engine/lib") {
450         include(name: "**/rmi-stubs.jar")
451       }
452       dir("rt") {
453         jar("xslt-debugger-engine-impl.jar") {
454           module("xslt-debugger-engine-impl") {
455             exclude(name: "lib")
456             exclude(name: "**/*.jar")
457             exclude(name: "**/*.html")
458           }
459         }
460         fileset(dir: "$home/plugins/xslt-debugger/engine/impl/lib") {
461           include(name: "**/*.jar")
462           exclude(name: "**/rmi-stubs.jar")
463           include(name: "**/*.html")
464         }
465       }
466     }
467
468     pluginDir("Groovy") {
469       dir("lib") {
470         jar("Groovy.jar") {
471           module("jetgroovy")
472           module("groovy-psi") {
473             exclude(name: "standardDsls/**")
474           }
475           module("structuralsearch-groovy")
476         }
477         //layout of groovy jars must be consistent with GroovyBuilder.getGroovyRtRoot method
478         jar("groovy-jps-plugin.jar") {
479           module("groovy-jps-plugin")
480         }
481         jar("groovy_rt.jar") {
482           module("groovy_rt")
483         }
484         jar("groovy-rt-constants.jar") {
485           module("groovy-rt-constants")
486         }
487         dir("standardDsls") {
488           fileset(dir: "$home/plugins/groovy/groovy-psi/resources/standardDsls")
489         }
490         dir("agent") {
491           fileset(dir: "${home}/plugins/groovy/hotswap") {
492             include(name: "gragent.jar")
493           }
494         }
495
496
497         fileset(dir: "$home/plugins/groovy/groovy-psi/resources/conf")
498       }
499     }
500
501     pluginDir("tasks") {
502       dir("lib") {
503         jar("tasks-api.jar") { module("tasks-api") }
504         jar("jira.jar") { module("jira") }
505         jar("tasks-core.jar") { module("tasks-core") }
506         jar("jira.jar") { module("jira") }
507         jar("tasks-java.jar") { moduleOptional("tasks-java") }
508         fileset(dir: "${home}/plugins/tasks/tasks-core/lib") {
509           include(name: "**/*.jar")
510         }
511       }
512     }
513
514     layoutPlugin("devkit") {
515       jar("devkit-jps-plugin.jar") {
516         module("devkit-jps-plugin")
517       }
518       fileset(dir: "${home}/plugins/devkit/lib") {
519         include(name: "**/*.jar")
520       }
521     }
522     layoutPlugin("eclipse") {
523       jar("eclipse-jps-plugin.jar") {
524         module("eclipse-jps-plugin")
525       }
526       jar("common-eclipse-util.jar") {
527         module("common-eclipse-util")
528       }
529     }
530
531     layoutPlugin("terminal") {
532       fileset(dir: "$home/plugins/terminal/lib") {
533         include(name: "*.jar")
534         include(name: "*.in")
535       }
536     }
537
538     layoutPlugin("editorconfig") {
539       fileset(dir: "$home/plugins/editorconfig/lib") {
540         include(name: "**/*.jar")
541       }
542     }
543
544     pluginDir("coverage") {
545       dir("lib") {
546         jar("coverage.jar") {
547           noResources("coverage-common")
548           noResources("coverage")
549         }
550
551         jar("coverage_rt.jar") {
552           noResources("coverage_rt")
553         }
554
555         jar("resources_en.jar") {
556           module("coverage-common") {
557             patternset(refid: "resources.included")
558           }
559           module("coverage") {
560             patternset(refid: "resources.included")
561           }
562         }
563
564         fileset(dir: "${home}/plugins/coverage-common/lib") {
565           exclude(name: "finder.jar")
566           exclude(name: "**/coverage-src.zip")
567         }
568
569         fileset(dir: "${home}/plugins/coverage/lib", excludes: "**/jacoco_src.zip")
570       }
571     }
572
573     pluginDir("java-decompiler") {
574       dir("lib") {
575         jar("java-decompiler.jar") {
576           module("java-decompiler-engine")
577           module("java-decompiler-plugin")
578         }
579       }
580     }
581   }
582 }
583
584
585 def layoutPlugin(String moduleName) {
586   layoutPlugin(moduleName, moduleName, {})
587 }
588
589 def layoutPlugin(String moduleName, Closure custom) {
590   layoutPlugin(moduleName, moduleName, custom)
591 }
592
593 def layoutPlugin(String pluginName, String moduleName) {
594   layoutPlugin(pluginName, moduleName, {})
595 }
596
597 def layoutPlugin(String pluginName, String moduleName, Closure custom) {
598   layoutPlugin(pluginName, moduleName, pluginName, custom)
599 }
600
601 def layoutPlugin(String pluginName, String moduleName, String jarName) {
602   layoutPlugin(pluginName, moduleName, jarName, {})
603 }
604
605 def layoutPlugin(String pluginName, String moduleName, String jarName, Closure custom) {
606   if (isDefined("pluginFilter")) {
607     if (!pluginFilter.contains(moduleName) && !pluginFilter.contains(pluginName)) return
608   }
609
610   dir(pluginName) {
611     dir("lib") {
612       jar("${jarName}.jar") {
613         noResources(moduleName)
614       }
615
616       resources(moduleName)
617       custom()
618     }
619   }
620 }
621
622 def pluginDir(String dirName, Closure initializer) {
623   if (isDefined("pluginFilter")) {
624     if (!pluginFilter.contains(dirName)) return
625   }
626
627   dir(dirName) {
628     initializer()
629   }
630 }
631
632 private def resources(List<String> modules) {
633   jar("resources_en.jar") {
634     modules.each {
635       module(it) {
636         patternset(refid: "resources.included")
637       }
638     }
639   }
640 }
641
642 private def resources(String moduleName) {
643   jar("resources_en.jar") {
644     module(moduleName) {
645       patternset(refid: "resources.included")
646     }
647   }
648 }
649
650 private def noResources(String moduleName) {
651   module(moduleName) {
652     patternset(refid: "resources.excluded")
653   }
654 }
655
656 def moduleOptional(String name) {
657   if (isDefined("pluginFilter")) {
658     if (!pluginFilter.contains(name)) return
659   }
660
661   module(name)
662 }
663
664 def moduleOptional(String name, Closure init) {
665   if (isDefined("pluginFilter")) {
666     if (!pluginFilter.contains(name)) return
667   }
668
669   module(name, init)
670 }
671
672 def reorder(String home, String targetDirectory) {
673   if (findModule("util") != null) {
674     ant.java(classname: "com.intellij.util.io.zip.ReorderJarsMain", fork: "true") {
675       arg(value: "$home/build/order.txt")
676       arg(value: targetDirectory)
677       arg(value: targetDirectory)
678       arg(value: "$home/lib")
679       classpath {
680         pathelement(location: projectBuilder.moduleOutput(findModule("util")))
681         pathelement(location: projectBuilder.moduleOutput(findModule("util-rt")))
682         pathelement(location: "$home/lib/jna.jar")
683         pathelement(location: "$home/lib/trove4j.jar")
684       }
685     }
686   }
687 }
688
689 def layoutAndroid(String androidHome) {
690   dir("plugins") {
691     layoutPlugin("android") {
692       fileset(dir: "${androidHome}/android/lib") {
693         include(name: "**/*.jar")
694         exclude(name: "**/fest-*.jar")
695         exclude(name: "src/*.jar")
696       }
697
698       jar("android-common.jar") {
699         module("android-common")
700       }
701
702       jar("android-rt.jar") {
703         module("android-rt")
704       }
705
706       jar("common.jar") {
707         module("common")
708       }
709       jar("sdklib.jar") {
710         module("sdklib")
711       }
712       jar("sdk-common.jar") {
713         module("sdk-common")
714       }
715       jar("layoutlib-api.jar") {
716         module("layoutlib-api")
717       }
718       jar("manifest-merger.jar") {
719         module("manifest-merger")
720       }
721       jar("sdk-tools.jar") {
722         module("assetstudio")
723         module("ddmlib")
724         module("dvlib")
725         module("draw9patch")
726         module("lint-api")
727         module("lint-checks")
728         module("ninepatch")
729         module("perflib")
730       }
731       jar("androidAnnotations.jar") {
732         fileset(dir: "$androidHome/android/annotations")
733       }
734       dir("jps") {
735         jar("android-gradle-jps.jar") { module("android-gradle-jps") }
736       }
737       dir("device-art-resources") {
738         fileset(dir: "$androidHome/android/device-art-resources")
739       }
740
741       dir("jps") {
742         jar("android-jps-plugin.jar") { module("android-jps-plugin") }
743       }
744       dir("templates") {
745         fileset(dir: "$androidHome/tools-base/templates")
746       }
747     }
748   }
749 }
750
751 def layoutJps(String home, String targetDir, String buildNumber, Closure additionalJars) {
752   layout(targetDir) {
753     zip("standalone-jps-${buildNumber}.zip") {
754       jar("util.jar") {
755         module("annotations")
756         module("util-rt")
757         module("util")
758       }
759
760       jar("jps-launcher.jar") {
761         module("jps-launcher")
762       }
763
764       jar("jps-model.jar") {
765         module("jps-model-api")
766         module("jps-model-impl")
767         module("jps-model-serialization")
768       }
769       jar("jps-builders.jar") {
770         module("forms_rt")
771         module("forms-compiler")
772         module("instrumentation-util")
773         module("jps-builders")
774         module("jps-standalone-builder")
775         module("java-runtime")
776       }
777       jar("jps-plugin-system.jar") {
778         module("jps-plugin-system")
779       }
780       jar("groovy-jps-plugin.jar") {
781         module("groovy-jps-plugin")
782         module("groovy-rt-constants")
783       }
784       jar("groovy_rt.jar") {
785         module("groovy_rt")
786       }
787       jar("ui-designer-jps-plugin.jar") { module("ui-designer-jps-plugin") }
788
789
790       jar("maven-jps-plugin.jar") { module("maven-jps-plugin") }
791       jar("gradle-jps-plugin.jar") { module("gradle-jps-plugin") }
792       fileset(dir: "$home/plugins/maven/maven30-server-impl/lib/maven3/lib") {include(name: "plexus-utils-*.jar")}
793
794       jar("eclipse-jps-plugin.jar") {
795         module("common-eclipse-util")
796         module("eclipse-jps-plugin")
797       }
798       jar("devkit-jps-plugin.jar") { module("devkit-jps-plugin") }
799       jar("intellilang-jps-plugin.jar") { module("intellilang-jps-plugin") }
800       fileset(dir: "$home/lib") {
801         include(name: "jdom.jar")
802         include(name: "jna.jar")
803         include(name: "trove4j.jar")
804         include(name: "asm-all.jar")
805         include(name: "nanoxml-*.jar")
806         include(name: "protobuf-*.jar")
807         include(name: "cli-parser-*.jar")
808         include(name: "log4j.jar")
809         include(name: "jgoodies-forms.jar")
810         include(name: "ecj*.jar")
811         include(name: "jsr166e.jar")
812         include(name: "netty-all-*.jar")
813       }
814       fileset(dir: "$home/jps/lib") {
815         include(name: "optimizedFileManager.jar")
816       }
817       jar("ant-jps-plugin.jar") { module("ant-jps-plugin") }
818       additionalJars()
819     }
820     jar("jps-build-test-${buildNumber}.jar") {
821       moduleTests("jps-builders")
822       moduleTests("jps-model-tests")
823       moduleTests("jps-serialization-tests")
824     }
825   }
826 }
827
828 def layout_core(String home, String target) {
829   layout(target) {
830     jar("intellij-core.jar") {
831       module("util-rt")
832       module("util")
833       module("core-api")
834       module("core-impl")
835       module("boot")
836       module("extensions")
837       module("java-psi-api")
838       module("java-psi-impl")
839     }
840
841     jar("annotations.jar") {
842       module("annotations")
843     }
844
845     jar("intellij-core-analysis.jar") {
846       analysisApiModules.each { module it; }
847       analysisImplModules.each { module it; }
848     }
849
850     fileset(dir: "$home/lib") {
851       include(name: "guava-17.0.jar")
852       include(name: "picocontainer.jar")
853       include(name: "trove4j.jar")
854       include(name: "asm.jar")
855       include(name: "asm-commons.jar")
856       include(name: "cli-parser-1.1.jar")
857       include(name: "snappy-in-java-0.3.1.jar")
858       include(name: "jayatana-1.2.4.jar")
859     }
860   }
861 }