forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Understand @qualified annotation in Kotlin properties.
Use Kotlin Metadata library to find the synthetic method where Kotlin property annotations are placed, then treat the annotations in such method as if they were part of the backing field. This allows for @qualified annotations with vague targets to be understood by Dagger when placed in Kotlin properties and specifically without the need of the user writing "@field:MyQualifier". Connecting Kotlin Metadata properties with AST elements requires finding and matching JVM Signatures (also known as descriptors). DaggerElements now contains methods to generate descriptors for both an ExecutableElement and a VariableElement. RELNOTES=Understand @qualifier annotation in Kotlin properties. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=267373331
- Loading branch information
1 parent
ab0e6be
commit 646e033
Showing
35 changed files
with
949 additions
and
75 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright (C) 2019 The Dagger Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Description: | ||
# Sources related to Kotlin metadata. | ||
|
||
package(default_visibility = ["//:src"]) | ||
|
||
java_library( | ||
name = "kotlin", | ||
srcs = glob(["*.java"]), | ||
plugins = ["//java/dagger/internal/codegen/bootstrap"], | ||
tags = ["maven:merged"], | ||
deps = [ | ||
"//java/dagger/internal/codegen/base", | ||
"//java/dagger/internal/codegen/langmodel", | ||
"@google_bazel_common//third_party/java/auto:common", | ||
"@google_bazel_common//third_party/java/guava", | ||
"@google_bazel_common//third_party/java/jsr330_inject", | ||
"@maven//:org_jetbrains_kotlin_kotlin_stdlib", | ||
"@maven//:org_jetbrains_kotlinx_kotlinx_metadata_jvm", | ||
], | ||
) |
Oops, something went wrong.