Skip to content

Commit

Permalink
Fix: Speed up build configuration time by lazily verifying apollo-cod…
Browse files Browse the repository at this point in the history
…egen installation

Move Apollo global verification to the beginning of the task to speed up configuration process.

Before, this I/O operation (version check) would run in configuration time and take up to 5sec. This runs in every Gradle execution (even when unrelated to Apollo)

This commit fixes apollographql#1203 and moves verification to a later stage.

This means that we cannot easily fall-back to local installation that easily. That's why an exception is thrown with an appropriate message. User should disable using this feature if they don't have global installation.
  • Loading branch information
tasomaniac committed Jul 26, 2019
1 parent 44d5255 commit 2d1bf88
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class ApolloSystemCodegenGenerationTask extends AbstractExecTask<ApolloSystemCod

ApolloSystemCodegenGenerationTask() {
super(ApolloSystemCodegenGenerationTask.class)
doFirst {
verifySystemApolloCodegenVersion()
}
}

@Override
Expand Down

0 comments on commit 2d1bf88

Please sign in to comment.