[plugin] support android compile targets #1231
Merged
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.
📝 Description
Default (JVM) build use
compileKotlin
/compileTestKotlin
tasks. Android builds use variants which has their own targets (e.g.compileDebugKotlin
). Since our tasks were finalized by the compile tasks we couldn't apply it on android builds as default JVM tasks don't exist.Cleaned up plugin logic for the default JVM builds by removing unnecessary
finalizeBy
clauses as adding client generating taskOutputDirectory
to the main/test sources automatically configures the necessary dependencies. Unfortunately same logic cannot be applied on Android projects as Android plugin is eagerly configured so configuring additional sources happens after this resolution. Until Android plugin is updated to support lazy configuration, we need to explicitly configure compile tasks to depend on our client generation tasks.🔗 Related Issues
Resolves: #1203