Use runtime classpath at root to workaround Dagger/Hilt API vs Impl issue.#2154
Merged
copybara-service[bot] merged 1 commit intomasterfrom Jan 6, 2021
Merged
Use runtime classpath at root to workaround Dagger/Hilt API vs Impl issue.#2154copybara-service[bot] merged 1 commit intomasterfrom
copybara-service[bot] merged 1 commit intomasterfrom
Conversation
512baf4 to
967ae9a
Compare
967ae9a to
2270fe5
Compare
|
When should I expect this to be fixed? Just for confirmation, this will solve the need to replace "implementation" with "api" right? |
Member
Yes - We still have a few issues to resolve before we can commit to this solution. No ETA sorry. |
5d5a744 to
9d6c1cf
Compare
02fe454 to
61fe1c4
Compare
…ssue. This CL adds a new Hilt option called 'enableClasspathAggregation' that will configure the compile classpath of the project (for app modules and tests) to use the runtime classpath. This means that transitive dependencies will be available during compilation which in turn will allow Dagger to traverse the classes along the dependency tree and will allow for Hilt's aggregating classes to be discovered. The classpath configuration is done by resolving the runtime configuration with an artifact view and adding it to the 'CompileOnly' config. This solution is inefficient and will cause build performance impact, but it is a starting point that can be further optimized by using a smarter transform that can extract the necessary classes required by Dagger and Hilt. Fixes: #1991 RELNOTES=Use runtime classpath at root to workaround Dagger/Hilt API vs Impl issue. PiperOrigin-RevId: 350239023
61fe1c4 to
239768b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use runtime classpath at root to workaround Dagger/Hilt API vs Impl issue.
This CL adds a new Hilt option called 'enableClasspathAggregation' that will configure the compile classpath of the project (for app modules and tests) to use the runtime classpath. This means that transitive dependencies will be available during compilation which in turn will allow Dagger to traverse the classes along the dependency tree and will allow for Hilt's aggregating classes to be discovered.
The classpath configuration is done by resolving the runtime configuration with an artifact view and adding it to the 'CompileOnly' config. This solution is inefficient and will cause build performance impact, but it is a starting point that can be further optimized by using a smarter transform that can extract the necessary classes required by Dagger and Hilt.
Fixes: #1991
RELNOTES=Use runtime classpath at root to workaround Dagger/Hilt API vs Impl issue.