Skip to content

Gradle + Eclipse + Annotation Processors (Share the Knowledge) #13

@michael-newsrx

Description

@michael-newsrx

(Share the Knowledge)

Please update the build.gradle and settings.gradle files to enable automatic annotation processor configuration for Eclipse (or provide a documentation fragment):

settings.gradle snippet

pluginManagement {
  plugins {
    /* ... other plugins ... */
    id "com.diffplug.eclipse.apt" version "3.29.1"
  }
}

build.gradle snippets

plugins {
    id "java"
    id "eclipse-wtp"

    // Required for correct setup of APT in Eclipse
    id "com.diffplug.eclipse.apt"

    // ... other plugins
}
// Required for correct setup of APT in Eclipse
eclipseJdt.dependsOn cleanEclipseJdt, eclipseJdtApt
eclipseJdtApt.dependsOn cleanEclipseJdtApt, eclipseFactorypath
eclipseFactorypath.dependsOn cleanEclipseFactorypath
eclipse {

    // Required for correct setup of APT in Eclipse
    synchronizationTasks eclipseJdt

    project { /* ... */ }

    classpath { /* ... */ }

    jdt {
        apt { /* optional configuration entries */ }
        factorypath { /* optional configuration entries */ }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestgradle

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions