mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 20:17:25 +00:00
[build] eclipse test target for Javac8 fixed
javac8 has a bizarre dependency situation: we need the stubs in src/stubs there to compile, but if they are there at runtime during a test run of javac8, they take precedence over the JDK's javac (because we include this as a separate cp entry, and thus it is not a bootclasspath item), and messes everything up. The fix is to tell eclipse to compile various src/X folders to different 'bin' targets, which required an update to ivyplusplus as well. also it was just broken in general, fixed that too :)
This commit is contained in:
4 files changed
+16
-8
No files matched your search
@@ -27,7 +27,7 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
|
||||
<target name="eclipse" depends="eclipse.projectfiles, eclipse.testtarget.default" description="Downloads dependencies, create eclipse project files, as well as debug/run test targets. Open this directory as project in eclipse (via import... existing projects)" />
|
||||
|
||||
<target name="eclipse.projectfiles" depends="deps">
|
||||
<ivy:eclipsegen source="1.6">
|
||||
<ivy:eclipsegen source="1.6" srcout="bin/main">
|
||||
<srcdir dir="src/core" />
|
||||
<srcdir dir="src/core8" />
|
||||
<srcdir dir="src/launch" />
|
||||
@@ -35,7 +35,7 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
|
||||
<srcdir dir="src/eclipseAgent" />
|
||||
<srcdir dir="src/installer" />
|
||||
<srcdir dir="src/delombok" />
|
||||
<srcdir dir="src/stubs" />
|
||||
<srcdir dir="src/stubs" srcout="bin/stubs" />
|
||||
<srcdir dir="src/support" />
|
||||
<srcdir dir="experimental/src" />
|
||||
<srcdir dir="test/transform/src" />
|
||||
@@ -116,7 +116,7 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
|
||||
|
||||
<condition property="inputs.jvmtarget" value="1.6"><equals arg1="${inputs.jvmtarget.raw}" arg2="6" /></condition>
|
||||
<condition property="inputs.jvmtarget" value="1.8"><equals arg1="${inputs.jvmtarget.raw}" arg2="8" /></condition>
|
||||
<property name="inputs" value="${inputs.jvmtarget.raw}" />
|
||||
<property name="inputs.jvmtarget" value="${inputs.jvmtarget.raw}" />
|
||||
|
||||
<condition property="inputs.bootpath" value="${jdk6-rt.loc}"><equals arg1="${inputs.jvmtarget.raw}" arg2="6" /></condition>
|
||||
<condition property="inputs.bootpath" value="${jdk8-rt.loc}"><equals arg1="${inputs.jvmtarget.raw}" arg2="8" /></condition>
|
||||
@@ -127,6 +127,12 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
|
||||
<target name="eclipse.testtarget.javac" depends="compile.support" description="Makes an eclipse launch target for running the tests for javac">
|
||||
<eclipse.testtarget.conf.jvmtarget question="Which javac do you want to target? Enter a version, such as '11'." validargs="8,11,13,14,15" />
|
||||
|
||||
<local name="inputs.confcp" />
|
||||
<condition property="inputs.confcp" value="NONE">
|
||||
<not><equals arg1="8" arg2="${inputs.jvmtarget.raw}" /></not>
|
||||
</condition>
|
||||
<property name="inputs.confcp" refid="cp.javac8" />
|
||||
|
||||
<java classname="lombok.eclipseCreate.CreateEclipseDebugTarget" failonerror="true">
|
||||
<classpath>
|
||||
<path refid="cp.buildtools" />
|
||||
|
||||
@@ -106,7 +106,7 @@ This buildfile is part of projectlombok.org. It sets up the build itself.
|
||||
|
||||
<target name="-ipp.load" depends="-ipp.download">
|
||||
<taskdef classpath="lib/ivyplusplus.jar" resource="com/zwitserloot/ivyplusplus/antlib.xml" uri="antlib:com.zwitserloot.ivyplusplus" />
|
||||
<ivy:ensureippversion version="1.36" property="ivyplusplus.minimumAvailable" />
|
||||
<ivy:ensureippversion version="1.38" property="ivyplusplus.minimumAvailable" />
|
||||
</target>
|
||||
|
||||
<target name="-ipp.redownload" unless="ivyplusplus.minimumAvailable">
|
||||
|
||||
@@ -38,7 +38,7 @@ This buildfile is part of projectlombok.org. It contains platform specific code
|
||||
<condition property="jvm.loc" value="${jvm.loc.force}">
|
||||
<and>
|
||||
<isset property="jvm.loc.force" />
|
||||
<not><matches string="${jvm.loc.force}" pattern="^\$\{jvm[0-9\.]+\.loc\}$" /></not>
|
||||
<not><matches string="${jvm.loc.force}" pattern="^\$\{jvm\.locations\.j[0-9\.]+\}$" /></not>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="jvm.loc.invalid">
|
||||
|
||||
@@ -95,10 +95,12 @@ public class CreateEclipseDebugTarget {
|
||||
|
||||
String bootpath = getBootPath();
|
||||
|
||||
launchContent.append("\t\t<listEntry value=\"<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/lombok/bin" path="3" type="2"/> \"/>\n");
|
||||
launchContent.append("\t\t<listEntry value=\"<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/lombok/bin/main" path="3" type="2"/> \"/>\n");
|
||||
for (Map.Entry<String, String> entry : args.entrySet()) {
|
||||
if (!entry.getKey().startsWith("conf.")) continue;
|
||||
String[] files = entry.getValue().split(Pattern.quote(File.pathSeparator));
|
||||
String v = entry.getValue();
|
||||
if (v.equals("NONE")) continue;
|
||||
String[] files = v.split(Pattern.quote(File.pathSeparator));
|
||||
for (String file : files) {
|
||||
String n;
|
||||
try {
|
||||
@@ -128,7 +130,7 @@ public class CreateEclipseDebugTarget {
|
||||
launchContent.append("\t<listAttribute key=\"org.eclipse.jdt.launching.MODULEPATH\"/>\n");
|
||||
launchContent.append("\t<stringAttribute key=\"org.eclipse.jdt.launching.PROJECT_ATTR\" value=\"lombok\"/>\n");
|
||||
if (getArgBoolean("shadowLoaderBased")) {
|
||||
launchContent.append("<stringAttribute key=\"org.eclipse.jdt.launching.VM_ARGUMENTS\" value=\"-javaagent:dist/lombok.jar -Dshadow.override.lombok=${project_loc:lombok}/bin");
|
||||
launchContent.append("<stringAttribute key=\"org.eclipse.jdt.launching.VM_ARGUMENTS\" value=\"-javaagent:dist/lombok.jar -Dshadow.override.lombok=${project_loc:lombok}/bin/main");
|
||||
for (Map.Entry<String, String> entry : args.entrySet()) {
|
||||
if (!entry.getKey().startsWith("conf.")) continue;
|
||||
launchContent.append(File.pathSeparator).append(entry.getValue());
|
||||
|
||||
Reference in new issue
Block a user