diff options
Diffstat (limited to 'experimental')
3 files changed, 25 insertions, 6 deletions
diff --git a/experimental/build.xml b/experimental/build.xml index 59dab9e2..24a4bf6c 100644 --- a/experimental/build.xml +++ b/experimental/build.xml @@ -36,6 +36,11 @@ Does the build and packaging work on experimental features. Currently available: <ant antfile="experimental/buildScripts/disableCheckedExceptions.ant.xml" target="dist" /> </target> + <target name="disableCheckedExceptions-publish" depends="buildDeps" + description="Creates the disableCheckedExceptions experimental jar, and uploads it."> + <ant antfile="experimental/buildScripts/disableCheckedExceptions.ant.xml" target="publish" /> + </target> + <target name="buildDeps"> <ant antfile="buildScripts/deps.ant.xml" target="build" inheritAll="false" /> </target> diff --git a/experimental/buildScripts/disableCheckedExceptions.ant.xml b/experimental/buildScripts/disableCheckedExceptions.ant.xml index b8deae24..1806be4d 100644 --- a/experimental/buildScripts/disableCheckedExceptions.ant.xml +++ b/experimental/buildScripts/disableCheckedExceptions.ant.xml @@ -42,6 +42,12 @@ </fileset> </path> + <path id="buildScripts.deps.path"> + <fileset dir="deps/buildScripts"> + <include name="**/*.jar" /> + </fileset> + </path> + <target name="-unpackLibs"> <mkdir dir="build/experimental/disableCheckedExceptions" /> <unjar dest="build/experimental/disableCheckedExceptions"> @@ -51,7 +57,7 @@ <target name="compile" description="Compiles disableCheckedExceptions."> <mkdir dir="build/experimental/disableCheckedExceptions" /> - <javac debug="on" destdir="build/experimental/disableCheckedExceptions" target="1.6"> + <javac includeDestClasses="false" debug="on" destdir="build/experimental/disableCheckedExceptions" target="1.6"> <src path="experimental/src" /> <include name="**/disableCheckedExceptions/**/*.java" /> <classpath refid="deps.path" /> @@ -62,14 +68,23 @@ <target name="dist" description="Creates the disable checked exceptions jar" depends="compile, -unpackLibs"> <mkdir dir="build/experimental/disableCheckedExceptions/META-INF" /> <mkdir dir="build/experimental/disableCheckedExceptions/META-INF/services" /> - <echo file="build/experimental/disableCheckedExceptions/META-INF/services/javax.annotation.processor">lombok.javac.disableCheckedExceptions.DynamicAgent</echo> + <echo file="build/experimental/disableCheckedExceptions/META-INF/services/javax.annotation.processing.Processor">lombok.javac.disableCheckedExceptions.DisableCheckedExceptionsAgent</echo> <jar destfile="dist/disableCheckedExceptions-alpha.jar"> <fileset dir="build/experimental/disableCheckedExceptions" /> <manifest> - <attribute name="Agent-Class" value="lombok.javac.disableCheckedExceptions.DynamicAgent" /> + <attribute name="Agent-Class" value="lombok.javac.disableCheckedExceptions.DisableCheckedExceptionsAgent" /> <attribute name="Can-Redefine-Classes" value="true" /> <attribute name="Can-Retransform-Classes" value="true" /> </manifest> </jar> </target> + + <taskdef name="scp" classname="org.apaxhe.tools.ant.taskdefs.optional.ssh.Scp" classpathref="buildScripts.deps.path" /> + <target name="publish" description="Creates the disable checked exceptions jar, and uploads it" depends="dist"> + <scp + localFile="dist/disableCheckedExceptions-alpha.jar" + todir="lombokup@projectlombok.org:/web/downloads" + keyfile="libertad-upload.key" passphrase="" + sftp="true" verbose="true" trust="true" /> + </target> </project> diff --git a/experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java b/experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java index deb4626f..8dc084ce 100644 --- a/experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java +++ b/experimental/src/lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent.java @@ -52,7 +52,7 @@ public class DisableCheckedExceptionsAgent extends AbstractProcessor { this.processingEnv = null; } - new LiveInjector().injectSelf(); + new LiveInjector().inject(LiveInjector.findPathJar(DisableCheckedExceptionsAgent.class)); } /** Does nothing - we just wanted the init method so we can inject an agent. */ @@ -81,10 +81,9 @@ public class DisableCheckedExceptionsAgent extends AbstractProcessor { sm.addScript(ScriptBuilder.exitEarly() .target(new MethodTarget("com.sun.tools.javac.comp.Check", "isUnchecked", "boolean", "com.sun.tools.javac.code.Symbol$ClassSymbol")) - .transplant() .decisionMethod(new Hook("lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent", "retTrue", "()Z")) .valueMethod(new Hook("lombok/javac/disableCheckedExceptions/DisableCheckedExceptionsAgent", "retTrue", "()Z")) - .build()); + .insert().build()); } public static boolean retTrue() { |