Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable incremental annotation processing #1231

Merged
merged 3 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dialogue-annotations-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ dependencies {

annotationProcessor 'com.google.auto.service:auto-service'
compileOnly 'com.google.auto.service:auto-service'
annotationProcessor 'net.ltgt.gradle.incap:incap-processor'
compileOnly 'net.ltgt.gradle.incap:incap'
annotationProcessor 'org.immutables:value'
compileOnly 'org.immutables:value::annotations'
annotationProcessor 'org.derive4j:derive4j'
compileOnly 'org.derive4j:derive4j-annotation'

testAnnotationProcessor 'org.immutables:value'
testCompileOnly 'org.immutables:value::annotations'
testCompileOnly 'net.ltgt.gradle.incap:incap'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary because the IncrementalAnnotationProcessor annotation has class retention. This is acceptable because downstream consumers do not compile against the annotation processor, see https://github.com/tbroyer/gradle-incap-helper#usage.

testImplementation project(':dialogue-annotations')
testImplementation project(':dialogue-target')
testImplementation 'com.fasterxml.jackson.core:jackson-annotations'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
import javax.tools.Diagnostic.Kind;
import net.ltgt.gradle.incap.IncrementalAnnotationProcessor;
import net.ltgt.gradle.incap.IncrementalAnnotationProcessorType;

@SupportedSourceVersion(SourceVersion.RELEASE_8)
@AutoService(Processor.class)
@IncrementalAnnotationProcessor(IncrementalAnnotationProcessorType.ISOLATING)
public final class DialogueRequestAnnotationsProcessor extends AbstractProcessor {

private Messager messager;
Expand Down
1 change: 1 addition & 0 deletions versions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ io.dropwizard.metrics:metrics-core:3.2.6 (3 constraints: b125441c)
jakarta.annotation:jakarta.annotation-api:1.3.5 (3 constraints: ee256969)
jakarta.ws.rs:jakarta.ws.rs-api:2.1.6 (3 constraints: ee256969)
joda-time:joda-time:2.10.8 (1 constraints: 2e16acf1)
net.ltgt.gradle.incap:incap:0.3 (1 constraints: a7041a2c)
org.apache.httpcomponents.client5:httpclient5:5.0.3 (1 constraints: 0a050736)
org.apache.httpcomponents.core5:httpcore5:5.1 (3 constraints: 392a5176)
org.apache.httpcomponents.core5:httpcore5-h2:5.0.2 (1 constraints: 3b13053c)
Expand Down
1 change: 1 addition & 0 deletions versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ com.palantir.tritium:* = 0.18.8
com.squareup:javapoet = 1.13.0
com.uber.nullaway:nullaway = 0.9.0
io.dropwizard.metrics:metrics-core = 3.2.6
net.ltgt.gradle.incap:* = 0.3
org.apache.httpcomponents.client5:httpclient5 = 5.0.3
org.apache.httpcomponents.core5:httpcore5 = 5.1
org.derive4j:* = 1.1.1
Expand Down