sourceSet other than `main` won't output
See original GitHub issueWhen I run gradle, it generates output files for the proto-files. These are put into $projectDir/src/$sourceSet/java/my/org/models/a.kt
(or a.java). This works for the sourceSet main
, but not for other sourceSets like commonMain
, although I defined the task for all sourceSets. The protofiles and directories are identical between sourceSet main
and commonMain
(I created main
just for testing).
Partial gradle build file here (https://gist.github.com/RdeWilde/ec3a5c9432004579643a47ed5fee3397)
Directory structure is:
src
+ commonMain
| |
| + java // no output :-(
| + proto
| |
| + protofile1.proto
| + protofile2.proto
|
+ main
|
+ java // does have output :-)
+ proto
|
+ protofile1.proto
+ protofile2.proto
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Gradle builds successfully without SourceSet, but fails with ...
By default Gradle will use src/main/java as base directory for main sourceSet, without needing it to be explicitly declared.
Read more >SourceSetOutput - Gradle DSL Version 7.6
Provides output information of the source set. Allows configuring the default output dirs and specify additional output dirs.
Read more >Gradle Source Sets - Baeldung
The test source set contains the outputs of main in its compile classpath and also includes its dependencies.
Read more >Inter sourcesets dependencies not recognized by Idea when ...
3. create separate module for different sourcesets is checked. ... of main depends on util, and the output of util is also included...
Read more >Configure build variants | Android Developers
For example, you can define basic functionality in the main/ source set and use product flavor source sets to change the branding of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I took some time to track down the issue I filed related to this. Linking it here for visibility KT-29156
I dont see this getting resolved anytime soon but its worth centralizing the history here at the very least.
Sorry that was a typo. I meant to say that the protobuf plugin would have to be made aware of the kotlin multiplatform plugin. I dont think the source set would need to explicitly implement
ExtensionAware
. Once its created by the object factory, the proxy that wraps the class will implicitly add it.