Repository navigation
MOE Sync 2020-05-08 - #1838
MOE Sync 2020-05-08#1838
Conversation
and ViewComponentBuilder.class to ViewWithFragmentComponentBuilder.class RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=310232879
These classes are only used by the RootProcessor, and merging helps simplify a lot of the boiler plate and reduces public visibility. This CL also simplifies how the test and test application entry points get added to the component. RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=310236493
Iterates over each declared method, finding in its bodies super calls. (e.g. super.onCreate()) and rewrites the method reference of the invokespecial instruction to one that uses the new superclass. The invokespecial instruction is emitted for code that between other things also invokes a method of a superclass of the current class. The opcode invokespecial takes two operands, each of 8 bit, that together represent an address in the constant pool to a method reference. The method reference is computed at compile-time by looking the direct superclass declaration, but at runtime the code behaves like invokevirtual, where as the actual method invoked is looked up based on the class hierarchy. However, it has been observed that on APIs 19 to 22 the Android Runtime (ART) jumps over the direct superclass and into the method reference class, causing unexpected behaviours. Therefore, this method performs the additional transformation to rewrite direct super call invocations to use a method reference whose class in the pool is the new superclass. Note that this is not necessary for constructor calls since the Javassist library takes care of those. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=310243862
*** Original change description *** [Hilt Refactor]: Merge root testing classes into processor/internal/root These classes are only used by the RootProcessor, and merging helps simplify a lot of the boiler plate and reduces public visibility. This CL also simplifies how the test and test application entry points get added to the component. *** ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=310259874
This is a set of custom lints along with fixes to help with migration to improved kotlin support in Dagger. This covers the following cases: * Using field: site target in injected properties * Using @JvmStatic in object modules * Annotating companion objects with @module This CL also includes the necessary infrastructure changes to build, package and deploy lint rules in the Dagger project. For Kotlin-only projects, a new artifact 'com.google.dagger:dagger-lint' will be published so that lint checks can be added via the lintChecks configuration in Gradle: ``` apply plugin: "com.android.lint" dependencies { lintChecks "com.google.dagger:dagger-lint:<version>" } ``` Meanwhile for users of Hilt and dagger-android, the lint checks will be applied from a new transitive dependency 'com.google.dagger:dagger-lint-aar'. Closes #1805 RELNOTES="Add custom lint checks to Dagger" ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=310269729
This adds dagger-compiler to the list of dependencies of the hilt-android-compiler POM so that depending on Hilt also includes Dagger on the compiler classpath. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=310391575
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
CLA:yes from #1805 |
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
This code has been reviewed and submitted internally. Feel free to discuss on
the PR, and we can submit follow-up changes as necessary.
Commits:
rename ViewComponent.class to ViewWithFragmentComponent.class and ViewComponentBuilder.class to ViewWithFragmentComponentBuilder.class
RELNOTES=N/A
e7559c7
[Hilt Refactor]: Merge root testing classes into processor/internal/root
These classes are only used by the RootProcessor, and merging helps simplify a lot of the boiler plate and reduces public visibility. This CL also simplifies how the test and test application entry points get added to the component.
RELNOTES=N/A
adb091c
Transform super call invocations to reference generated superclass.
Iterates over each declared method, finding in its bodies super calls.
(e.g. super.onCreate()) and rewrites the method reference of the
invokespecial instruction to one that uses the new superclass.
The invokespecial instruction is emitted for code that between other
things also invokes a method of a superclass of the current class.
The opcode invokespecial takes two operands, each of 8 bit, that
together represent an address in the constant pool to a method
reference. The method reference is computed at compile-time by looking
the direct superclass declaration, but at runtime the code behaves
like invokevirtual, where as the actual method invoked is looked up
based on the class hierarchy.
However, it has been observed that on APIs 19 to 22 the Android
Runtime (ART) jumps over the direct superclass and into the method
reference class, causing unexpected behaviours. Therefore, this method
performs the additional transformation to rewrite direct super call
invocations to use a method reference whose class in the pool is the
new superclass. Note that this is not necessary for constructor calls
since the Javassist library takes care of those.
359dd3e
Rollback adb091c due to internal failures
*** Original change description ***
[Hilt Refactor]: Merge root testing classes into processor/internal/root
These classes are only used by the RootProcessor, and merging helps simplify a lot of the boiler plate and reduces public visibility. This CL also simplifies how the test and test application entry points get added to the component.
7f6d0ac
Add DaggerKotlinIssuesDetector
This is a set of custom lints along with fixes to help with migration
to improved kotlin support in Dagger.
This covers the following cases:
This CL also includes the necessary infrastructure changes to build,
package and deploy lint rules in the Dagger project.
For Kotlin-only projects, a new artifact 'com.google.dagger:dagger-lint'
will be published so that lint checks can be added via the lintChecks
configuration in Gradle:
Meanwhile for users of Hilt and dagger-android, the lint checks will be
applied from a new transitive dependency 'com.google.dagger:dagger-lint-aar'.
Closes #1805
RELNOTES="Add custom lint checks to Dagger"
38dd765
Add dagger-compiler as a maven dep of hilt-android-compiler.
This adds dagger-compiler to the list of dependencies of the
hilt-android-compiler POM so that depending on Hilt also includes
Dagger on the compiler classpath.
f191937