-
Notifications
You must be signed in to change notification settings - Fork 276
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
Integrate with kotlin gradle plugin #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM with minor comments.
@@ -59,6 +60,23 @@ class ProtobufPlugin implements Plugin<Project> { | |||
'android-library', | |||
] | |||
|
|||
private static final String USER_LANG_PROP = 'protobuf_gradle_plugin_additional_languages' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gRPC use lower camelcase for its project property names. A quick search on the internet also shows such pattern:
http://mrhaki.blogspot.com/2016/05/gradle-goodness-get-property-or-default.html
We should probably follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
javaCompileTask.dependsOn(generateProtoTask) | ||
generateProtoTask.getAllOutputDirs().each { dir -> | ||
javaCompileTask.source project.fileTree([dir:dir]) | ||
project.sourceSets.each { SourceSet sourceSet -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have plan to add support for Android projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have a PR that's ready to be posted after this one is merged.
any plans for this to get released? Is there a snapshot version available that can/should be used? |
Since #208 is now resolved, I think we can release what we have on master branch @zhangkun83 |
This tries to be generic wrt language build tasks, and specifically tests against kotlin. If users want to enable additional unsupported languages, they can set the project property
protobuf_gradle_plugin_additional_languages
as aList<String>
of more languages.Test projects are now created programmatically by repeatedly copying overlay directories into a temp directory.
Updated tests and examples:
This only tests a plain kotlin project. A follow up PR will address Android.