IncrementalCompilationInitializerTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add first-class support for Javac's -h option

Add the headerOutputDirectory as a compile option,

track it as an output directory and delete stale headers

when doing incremental compilation.

    • -94
    • +0
    ./IncrementalCompilationInitializerTest.groovy
  1. … 20 more files in changeset.
Fix problems with incremental compilation

gradle/gradle#4988 caused changes to go undetected for incremental

compilation. As soon as we have java sources in some non-trivial

packages, this code never matches:

```

spec.setSourceFiles(ImmutableFileCollection.of(spec.getSourceFiles()).getAsFileTree().matching(sourceToCompile).getFiles());

```

Before the dogfooding, `spec.getSourceFiles()`` was a `FileTree`, so

`getAsFileTree` didn't have any effect. Matching was done relative to

the root dir of the file tree.

Now, getSourceFiles() returns all the .java source files individually

without any tree structure. That means that every file will be treated

as a root file and only patterns without any path match. Therefore,

sourceFiles are set to an empty collections and nothing is recompiled.

This commit solves the problem by passing down the original `FileTree`

which will then be used for matching. Spec.sourceFiles is only set as

soon as all the source files are known, thus avoiding walking the

source directories twice.

    • -1
    • +2
    ./IncrementalCompilationInitializerTest.groovy
  1. … 6 more files in changeset.
Dogfood ImmutableFileCollection on production code (#4988)

This reverts commit 13eaebc2b1244511dcbff4c59cd41253e3b69642.

    • -1
    • +1
    ./IncrementalCompilationInitializerTest.groovy
  1. … 88 more files in changeset.
Revert "Dogfood ImmutableFileCollection on production code (#4988)"

This reverts commit 834632674ca29b6fd190857947338b2b54a9bb62.

The commit caused a bug in incremental compilation, causing changes

to go undetected.

    • -1
    • +1
    ./IncrementalCompilationInitializerTest.groovy
  1. … 88 more files in changeset.
Dogfood ImmutableFileCollection on production code (#4988)

Use ImmutableFileCollection in production code

    • -1
    • +1
    ./IncrementalCompilationInitializerTest.groovy
  1. … 88 more files in changeset.
Make aggregating annotation processors faster

Aggregating processors need to reprocess all classes they are

interested in on any change. Until now this was ensured by passing

all their source files to the compiler for recompilation.

However, the Java compiler can run annotation processing on class

files too. So instead of recompiling the (unchanged) source files

we now tell the compiler which classes to reprocess. This adds a

small new limitation for aggregating processors - their annotations

need to have at least CLASS retention to be visible in the class

files. The benefit is much faster compilation.

    • -4
    • +33
    ./IncrementalCompilationInitializerTest.groovy
  1. … 27 more files in changeset.
Make single origin processors incremental

Record the origin->generated type mapping from the Filer

API and recompile generated types when their origin changes.

Delete stale .java files in addition to stale .class files.

    • -11
    • +10
    ./IncrementalCompilationInitializerTest.groovy
  1. … 25 more files in changeset.
Fix incremental compilation with inner classes

Issue: #2996

    • -0
    • +2
    ./IncrementalCompilationInitializerTest.groovy
  1. … 2 more files in changeset.
Fix incremental compilation with inner classes

Issue: #2996

    • -0
    • +2
    ./IncrementalCompilationInitializerTest.groovy
  1. … 2 more files in changeset.
Extract java and groovy compilation into separate language subprojects

- ‘language-java’ contains JavaCompile task, compiler infrastructure and associated classes

- ‘language-groovy’ contains GroovyCompile task and associated infrastructure

- depends on ‘language-java’

- ‘language-jvm’ contains ProcessResources task and some common JVM language infrastructure

    • -0
    • +63
    ./IncrementalCompilationInitializerTest.groovy
  1. … 321 more files in changeset.