mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
duplication reduced: call JARs reordering from a single place
This commit is contained in:
+11
-12
@@ -18,6 +18,7 @@ import static org.jetbrains.jps.idea.IdeaProjectLoader.guessHome
|
||||
includeTargets << new File("${guessHome(this)}/build/scripts/utils.gant")
|
||||
|
||||
target('default': "Developers update") {
|
||||
loadProjectFromPath(home)
|
||||
def patchedDescriptorDir = patchAppDescriptor(deploy)
|
||||
layoutFull(home, deploy, patchedDescriptorDir)
|
||||
ant.delete(dir: patchedDescriptorDir)
|
||||
@@ -261,7 +262,7 @@ def layoutFull(String home, String targetDirectory, String patchedDescriptorDir
|
||||
|
||||
printUnusedModules(info.usedModules)
|
||||
|
||||
//reorder(targetDirectory)
|
||||
reorder(home, targetDirectory)
|
||||
return info
|
||||
}
|
||||
|
||||
@@ -681,17 +682,15 @@ def moduleOptional(String name, Closure init) {
|
||||
}
|
||||
|
||||
def reorder(String home, String targetDirectory) {
|
||||
if (findModule("util") != null) {
|
||||
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: projectBuilder.moduleOutput(findModule("util")))
|
||||
pathelement(location: projectBuilder.moduleOutput(findModule("util-rt")))
|
||||
pathelement(location: "$home/lib/jna.jar")
|
||||
pathelement(location: "$home/lib/trove4j.jar")
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,20 +42,6 @@
|
||||
<arg value="-f"/>
|
||||
<arg value="gant.xml"/>
|
||||
</java>
|
||||
|
||||
<java classname="com.intellij.util.io.zip.ReorderJarsMain" fork="true">
|
||||
<jvmarg line="-Djava.awt.headless=true"/>
|
||||
<arg value="${build}/order.txt"/>
|
||||
<arg value="@{deploy}"/>
|
||||
<arg value="@{deploy}"/>
|
||||
<arg value="${project.home}/lib"/>
|
||||
<classpath>
|
||||
<pathelement location="${modules.output}/production/util-rt"/>
|
||||
<pathelement location="${modules.output}/production/util"/>
|
||||
<pathelement location="${project.home}/lib/jna.jar"/>
|
||||
<pathelement location="${project.home}/lib/trove4j.jar"/>
|
||||
</classpath>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user