1 import static org.jetbrains.jps.idea.IdeaProjectLoader.*
3 includeTargets << new File("${guessHome(this)}/build/scripts/utils.gant")
5 requireProperty("out", "$home/out/classes")
7 target(compile: "Compile project") {
9 project["javac"] = "$jdk/bin/javac"
10 project.targetFolder = out
15 def pass(String prop) {
16 if (isDefined(prop)) {
17 ant.jvmarg(value: "-D$prop=${p(prop)}")
21 target('default': 'The default target') {
24 ant.junit(fork: "yes", showoutput: "true") {
26 jvmarg (value: "-Didea.home.path=$home")
27 pass("idea.test.group")
28 pass("teamcity.tests.recentlyFailedTests.file")
29 jvmarg (value: "-Didea.platform.prefix=Idea")
30 jvmarg (value: "-Didea.home.path=$home")
31 jvmarg (value: "-Xbootclasspath/p:${boot.output}")
32 jvmarg (value: "-Djava.system.class.loader=com.intellij.util.lang.UrlClassLoader")
33 jvmarg (value: "-XX:+HeapDumpOnOutOfMemoryError")
34 jvmarg (value: "-Didea.system.path=${p("teamcity.build.tempDir")}/system")
35 jvmarg (value: "-Didea.config.path=${p("teamcity.build.tempDir")}/config")
36 jvmarg (value: "-agentlib:yjpagent=disablej2ee,disablealloc,sessionname=MainTests")
37 jvmarg (value: "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005")
39 if (isDefined("jvm_args")) {
40 jvm_args.each { jvmarg(value: it) }
44 this["community-main"].testRuntimeClasspath().each {
45 pathelement(location: it)
47 pathelement(location: "${jdk}/lib/tools.jar")