nickcellar / annotation-processor-with-java8-jack-and-jill-android

Android Annotation Processor With Java8 and Jack&Jill
87 stars 6 forks source link

lombok java 8 android Support #9

Open nksaroj opened 8 years ago

nksaroj commented 8 years ago

We can't compile any project with lombok at the moment getting the following error com.android.jack.api.v01.CompilationException: Failed to compile at com.android.jack.api.v01.impl.Api01ConfigImpl$Api01CompilationTaskImpl.run(Api01ConfigImpl.java:109) at com.android.builder.core.AndroidBuilder.convertByteCodeUsingJackApis(AndroidBuilder.java:1931) at com.android.build.gradle.tasks.JackTask.doMinification(JackTask.java:148) at com.android.build.gradle.tasks.JackTask.access$000(JackTask.java:73) at com.android.build.gradle.tasks.JackTask$1.run(JackTask.java:112) at com.android.builder.tasks.Job.runTask(Job.java:51) at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41) at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:223) at java.lang.Thread.run(Thread.java:745) Caused by: com.android.jack.frontend.FrontendCompilationException: Failed to compile at com.android.jack.Jack.buildSession(Jack.java:978) at com.android.jack.Jack.run(Jack.java:496) at com.android.jack.api.v01.impl.Api01ConfigImpl$Api01CompilationTaskImpl.run(Api01ConfigImpl.java:102) ... 8 more Warning: Exception while processing task java.io.IOException: com.android.jack.api.v01.CompilationException: Failed to compile :AndroidApp:compileAppDebugJavaWithJack FAILED

jaredsburrows commented 8 years ago

Use retro lambda's lombok:

buildscript {
    repositories {
        maven { url "https://plugins.gradle.org/m2/" }
    }

    dependencies {
        classpath "com.android.tools.build:gradle:2.2.+"
        classpath "me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2"
    }
}

Exclude the original:

configurations {
    classpath {
        exclude group: "com.android.tools.external.lombok"
    }
}