-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sourceSet other than main
won't output
#64
Comments
I’ve ran into this issue before but haven’t had time to get it resolved. The last time I dug into it there were two things that need to be resolved. The first being that the source sets in the kotlin multi platform Gradle plugin we’re not being instantiated using an object factory. This means that their instance at runtime was not The other issue is that the protobuf Gradle plugin needs to be updated to support this new source set type and take the kotlin multiple plugin into consideration during bootstrapping. One work around I used was to generate the sources in a separate module and copy them over to commonMain for dev/testing. |
Yes, I manually copy the files from Sounds like it will be a little too hard for me to fix. Maybe I'll give it a try. Thanks for the info 👍 |
This line should implement an object factory? And this inteface should implement
Not sure what this means |
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 |
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. |
When 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 sourceSetmain
, but not for other sourceSets likecommonMain
, although I defined the task for all sourceSets. The protofiles and directories are identical between sourceSetmain
andcommonMain
(I createdmain
just for testing).Partial gradle build file here (https://gist.github.com/RdeWilde/ec3a5c9432004579643a47ed5fee3397)
Directory structure is:
The text was updated successfully, but these errors were encountered: