JavaAnnotationProcessingIntegrationTest.groovy

Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Remove `@ToBeFixedForInstantExecution` from `JavaAnnotationProcessingIntegrationTest`

    • -2
    • +0
    ./JavaAnnotationProcessingIntegrationTest.groovy
Slightly improve handling of Jar manifests when loading from the instant execution cache, so that Jar tasks are up-to-date on first load from the instant execution cache when nothing has changed.

    • -11
    • +10
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 18 more files in changeset.
Rename @FailsWithInstantExecution to @ToBeFixedForInstantExecution

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -3
    • +3
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 872 more files in changeset.
Annotate integ tests failing with instant execution in :languageJava

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +3
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 34 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

    • -1
    • +1
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 98 more files in changeset.
Prefer implementation/api over compile in language-java tests

    • -5
    • +9
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 9 more files in changeset.
Add annotation processor generated sources to SourceSetOutput

Signed-off-by: Thomas Broyer <t.broyer@ltgt.net>

    • -0
    • +17
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 9 more files in changeset.
Reference enum constants from tests

    • -1
    • +2
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 3 more files in changeset.
Track execution time in nanoseconds

This commit changes `TimeTrackingProcessor` to internally use Guava's

`Stopwatch` for keeping track of execution time. The lossy conversion to

millis is performed after each operation, but rounding errors do no

longer accumulate.

    • -7
    • +14
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 4 more files in changeset.
Only decorate compilation of JavaCompile task

Makes names clearer and reduces potential confusion.

    • -6
    • +6
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 19 more files in changeset.
Report annotation processor type in build operation result

Instead of just reporting whether an annotation processor was

incremental, we now report its type, i.e. aggregating, isolating, or

unknown.

    • -1
    • +1
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 10 more files in changeset.
Report whether annotation processor is incremental

This commit adds an `incremental` property to the result of the build

operation and checks that it’s reported correctly for the different

annotation processor types.

    • -0
    • +1
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 23 more files in changeset.
Report List<AnnotationProcessorDetails> instead of Map<String, Long>

    • -8
    • +16
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 4 more files in changeset.
Allow to detect when annotation processor info is missing

- Remove redundant task path from build operation details as it's

enclosed in an ExecuteTaskBuildOperationType operation already.

- Add coverage for forking compilation where annotation processors are

neither instrumented nor tracked.

- Use `null` to signal that no annotation processor execution times are

available.

- Extract lookup code for build operation into separate fixture class

and reuse it in all tests.

    • -24
    • +33
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 6 more files in changeset.
Report annotation processor execution time

In order to track time spent by annotation processors, invocations of

compilers in `JavaCompile` and `GroovyCompile` are now wrapped in build

operations that report the execution time per fully-qualified annotation

processor class name in their result.

    • -15
    • +79
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 22 more files in changeset.
Set default value to annotationProcessorGeneratedSourcesDirectory

This also fixes the documentation for the options.annotationProcessorPath

default value.

Fixes #4956

Signed-off-by: Thomas Broyer <t.broyer@ltgt.net>

    • -3
    • +3
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 10 more files in changeset.
Forbid specifying -processorpath in compiler args

Resolves #6295.

    • -26
    • +0
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 7 more files in changeset.
Ignore annotation processors on compile classpath

Resolves #6296.

    • -4
    • +4
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 17 more files in changeset.
Make Lombok work in forked compilers

Lombok (and potentially other processors) access certain compiler

internals to do their magic. While this is not valid according to

the processing spec, we still need to support it unless we want to

annoy a big part of our user base.

    • -1
    • +0
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 2 more files in changeset.
Remove unnecessary @LeaksFileHandles and fork = true

These were added to work around file leaks in the

in-processor Java/Groovy compilers, which were fixed

in previous commits. This makes the tests faster and

also makes sure that we will spot any future leaks

that could make our user's life harder.

    • -5
    • +0
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 10 more files in changeset.
Resolve source files later

The cleaning compiler may still remove some of the source files for

some configurations, so we may pass non-existing files to the compiler

which causes the compilation to fail.

See https://github.com/gradle/gradle/issues/5448.

    • -0
    • +29
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 9 more files in changeset.
Delete stale generated sources on full recompiles

Fixes https://github.com/gradle/gradle/issues/4935

    • -0
    • +19
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 13 more files in changeset.
Fix languageJava usages of output test fixtures

    • -2
    • +2
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 3 more files in changeset.
Change int tests to use relevant fixture methods to express their expectations about the build log output.

    • -1
    • +1
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 22 more files in changeset.
Merge pull request #4331 from gradle/oehme/apt/incremental/validation

Validate incremental annotation processors

    • -2
    • +17
    ./JavaAnnotationProcessingIntegrationTest.groovy
Allow ArgumentProviders be passed as Test/JavaExec Jvm arguments (#4300)

* Allow ArgumentProviders be passed to Test Jvm arguments

* Make it possible to pass argument providers to JavaExec

    • -3
    • +1
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 26 more files in changeset.
Validate Filer usage of incremental annotaiton processors

This ensures that annotation processors which register themselves

as incremental actually honor their contract. They need to provide

originating elements for every file they generate. Single origin

processors can only provide one such element, multiple origin

processors can provide many. Neither of them are allowed to create

or read resource files, since our incremental compiler only tracks

class changes.

With this validation in place, annotation processor authors can

already start checking their processors for compatibility before

we have even implemented the actual incremental compilation.

This change also fixes some corner cases in our annotation processor

detection, so we never report the same processor twice. This can happen

if a processor is present on the classpath in different versions.

    • -2
    • +17
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 34 more files in changeset.
Name the processors that prevent incremental compilation

Instead of just informing the user that "processors were present".

This can be expanded once we support different types of incremental

processors.

    • -1
    • +1
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 20 more files in changeset.
Split processor detection out of path computation

    • -3
    • +3
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 12 more files in changeset.
Allow rich Java compiler arguments (#3858)

This allows adding richer compiler arguments to JavaCompile.

    • -2
    • +36
    ./JavaAnnotationProcessingIntegrationTest.groovy
  1. … 30 more files in changeset.