{"action":"created","issue":{"url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/109","repository_url":"https://api.github.com/repos/google/protobuf-gradle-plugin","labels_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/109/comments","events_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/109/events","html_url":"https://github.com/google/protobuf-gradle-plugin/issues/109","id":192565917,"number":109,"title":"generated files should be added to gradle sources","user":{"login":"TomDePauw","id":4736126,"avatar_url":"https://avatars.githubusercontent.com/u/4736126?v=3","gravatar_id":"","url":"https://api.github.com/users/TomDePauw","html_url":"https://github.com/TomDePauw","followers_url":"https://api.github.com/users/TomDePauw/followers","following_url":"https://api.github.com/users/TomDePauw/following{/other_user}","gists_url":"https://api.github.com/users/TomDePauw/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDePauw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDePauw/subscriptions","organizations_url":"https://api.github.com/users/TomDePauw/orgs","repos_url":"https://api.github.com/users/TomDePauw/repos","events_url":"https://api.github.com/users/TomDePauw/events{/privacy}","received_events_url":"https://api.github.com/users/TomDePauw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-30T13:30:55Z","updated_at":"2016-12-01T08:15:23Z","closed_at":null,"body":"now we need a hack to get things working in eclipse or intellij, same when publishing to maven (-sources.jar files).\r\nfor eclipse, maven-publish, .. i use in my project:\r\n\r\n```\r\nsourceSets {\r\n    main {\r\n        java {\r\n            srcDirs 'build/generated/source/proto/main/grpc'\r\n            srcDirs 'build/generated/source/proto/main/java'\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nIt would be handy if the plugin added these files to the sources."},"comment":{"url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/comments/264106280","html_url":"https://github.com/google/protobuf-gradle-plugin/issues/109#issuecomment-264106280","issue_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/109","id":264106280,"user":{"login":"TomDePauw","id":4736126,"avatar_url":"https://avatars.githubusercontent.com/u/4736126?v=3","gravatar_id":"","url":"https://api.github.com/users/TomDePauw","html_url":"https://github.com/TomDePauw","followers_url":"https://api.github.com/users/TomDePauw/followers","following_url":"https://api.github.com/users/TomDePauw/following{/other_user}","gists_url":"https://api.github.com/users/TomDePauw/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDePauw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDePauw/subscriptions","organizations_url":"https://api.github.com/users/TomDePauw/orgs","repos_url":"https://api.github.com/users/TomDePauw/repos","events_url":"https://api.github.com/users/TomDePauw/events{/privacy}","received_events_url":"https://api.github.com/users/TomDePauw/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T08:15:23Z","updated_at":"2016-12-01T08:15:23Z","body":"yes i used that to make a similar thing for eclipse\r\n\r\n```\r\neclipse{\r\n     classpath {\r\n         file {\r\n             withXml {\r\n                 def node = it.asNode()\r\n                 node.appendNode('classpathentry', [kind: 'src', path: \"build/generated/source/proto/main/grpc\"])\r\n                 node.appendNode('classpathentry', [kind: 'src', path: \"build/generated/source/proto/main/java\"])\r\n            }\r\n         }\r\n     }\r\n }\r\n```\r\n \r\nBut what i want to do is publish the project to a local maven repo. That also works, but if i want the sources to also publish to the repo, they need to be available. So i need a similar 'hack' for that, or the java files need to be added to the gradle sources. Like the example i gave in my first post. Doing that fixes the IDEA/eclipse and maven publishing issue.\r\n\r\nMy thought is that the protobuf-gradle-plugin should add it to the sources. So it works out of the box."}}
{"actor":{"display_login":"TomDePauw"}}