Generate associates abi jar with plugin#1479
Open
rbeazleyspot wants to merge 7 commits intobazel-contrib:masterfrom
Open
Generate associates abi jar with plugin#1479rbeazleyspot wants to merge 7 commits intobazel-contrib:masterfrom
rbeazleyspot wants to merge 7 commits intobazel-contrib:masterfrom
Conversation
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.
This is a different fix for issue #1467 when Kapt generates Java code such as that generated by KAPT that requires access to internal classes that are stripped from ABI jars.
If a target B associates with a target A and B is generating Dagger code, the call to java_common.compile in _run_kt_java_builder_actions doesn't seem to have access to the internal symbols from the associates array. Hence, compilation of the Java code fails.
This PR adds a new "Associates ABI Jar" that contains public and internal, its behind an experimental flag. Its only useful in the case where a strict public only ABI jar is produced.
This new experimental abi jar is used as a dep for the java compile action when associating with a target.
It uses the same kotlin abi gen plugin but configures it to not treat internal as private classes, it still enforces removal of privates from this jar.
The plugin had to be wrappped and bound with a different ID so that it can be configured differently along side the existing plugin.
There is an example dagger with associates project added which accounts for most of the changed lines.