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

Add tests for Gradle incremental compilation #1075

Open
eamonnmcmanus opened this issue Apr 16, 2021 · 2 comments
Open

Add tests for Gradle incremental compilation #1075

eamonnmcmanus opened this issue Apr 16, 2021 · 2 comments

Comments

@eamonnmcmanus
Copy link
Member

We broke 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:

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.

@tbroyer
Copy link
Contributor

tbroyer commented Apr 16, 2021

The Dagger build deploys the artifacts to the local repository to be able to easily load them from the Gradle builds (run separately from the GitHub Actions workflow).

(they don't test incremental processing AFAICT, only that everything works correctly, which includes the way they generate the POMs and JARs from the Bazel build)

@eamonnmcmanus
Copy link
Member Author

@tbroyer how does #1076 look to you?

@eamonnmcmanus eamonnmcmanus self-assigned this Apr 21, 2021
copybara-service bot pushed a commit that referenced this issue Apr 21, 2021
Partial fix for #1075. Still need a test for AutoFactory.

Many thanks to @tbroyer for help developing this.

Closes #1076.

RELNOTES=n/a
PiperOrigin-RevId: 369716434
copybara-service bot pushed a commit that referenced this issue Apr 21, 2021
Partial fix for #1075. Still need a test for AutoFactory.

Many thanks to @tbroyer for help developing this.

Closes #1076.

RELNOTES=n/a
PiperOrigin-RevId: 369716434
copybara-service bot pushed a commit that referenced this issue Apr 21, 2021
Partial fix for #1075. Still need a test for AutoFactory.

Many thanks to @tbroyer for help developing this.

Closes #1076.

RELNOTES=n/a
PiperOrigin-RevId: 369735867
@kluever kluever added the P3 label Apr 23, 2021
@google google deleted a comment from Rishu-singhm Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants