echocat / gradle-golang-plugin

Gradle plugin to build, test and do other stuff of Golang projects.
https://github.com/echocat/gradle-golang-plugin
Mozilla Public License 2.0
44 stars 8 forks source link

If this plugin is used together with other default plugin task names could clash #20

Closed billsegall closed 7 years ago

billsegall commented 7 years ago

When trying to add the gradle-golang plugin to https://github.com/real-logic/simple-binary-encoding I see:

This seem similar to https://github.com/GradleFx/GradleFx/issues/235 which was fixed by this patch: https://github.com/GradleFx/GradleFx/commit/0a8bf8997cc2c31f7edb66c6260dc6f4987f1d91

blaubaer commented 7 years ago

Hi @billsegall!

I understand your problem. Your problem is, that you mix up and java project with an golang project at once. This is not directly a bug of this plugin. Same things will happen if you mix up other source code types within gradle.

I purpose to add a /gocode/build.gradle with depends only on golang-gradle-plugin and add subcall for generateGolangCodecs to your /build.gradle in the root of your project.

But I will check if it is possible to rename this build steps in special cases.

Cheers, Gregor

blaubaer commented 7 years ago

I found a way. I've created a plugin extension. It is named org.echocat.golang-minor instead org.echocat.golang. If the minor version is used every tasks is prefixed with golang and the next letter is capitalized .. example: build -> golangBuild.

I hope I can release this as expected. 😄

blaubaer commented 7 years ago

Ok I have released this and also tested. All went as expected. Please use in your case the plugin with id org.echocat.golang-minor instead of org.echocat.golang in version 0.1.15 and each task is prefixed with golang.