google / google/auto

Add tests for Gradle incremental compilation

Open
#1,075 2 comments 0 reactions 1 assignee Claimed by @eamonnmcmanus View on GitHub
Component: factory Component: value P3
Dominant language
Java
Stars
10.6k
Forks
1.2k
Avg merge
6h 32m
Merged PRs (30d)
13

Description

We [broke](https://github.com/google/auto/issues/1071) Gradle incremental compilation in AutoValue 1.8 and AutoFactory 1.0, and furthermore I had to make 3 attempts to fix it before succeeding. The problem is that we don't use Gradle internally and it isn't part of our tests. We should add a test that ensures that it doesn't break again.

@tbroyer [wrote](https://github.com/google/auto/pull/1073#issuecomment-821390274):
> You could have a look at https://github.com/tbroyer/gradle-incap-helper/tree/v0.3/integTest/src/test/kotlin/net/ltgt/gradle/incap/integTest, it uses Gradle Test Kit (so has to be run from a Gradle build) to drive another Gradle build and check its output (this is based on log messages, because it's not that easy to do it otherwise: tbroyer/gradle-incap-helper#2)
> Because this is testing net.ltgt.gradle.incap:incap-processor itself, the test code is itself an annotation processor; it would likely be simpler for the Auto projects.

Our tests are run from Maven, not Gradle, so it might be a bit trickier. We might need to launch one Gradle instance to have it run the test against a second Gradle instance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.