Skip to content
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

Mistake in Gradle README? #130

Closed
benmccann opened this issue Apr 29, 2020 · 3 comments
Closed

Mistake in Gradle README? #130

benmccann opened this issue Apr 29, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@benmccann
Copy link
Contributor

Issue Description

I'm trying out the Gradle plugin, but having some difficulty.

Steps to Reproduce

Create a Gradle project with the sample configuration from the README: https://github.com/kobylynskyi/graphql-java-codegen/tree/master/plugins/gradle#buildgradle

outputDir = "$buildDir/generated/graphql"

Expected Result

Expected project to successfully build

Actual Result

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred evaluating root project 'micronaut-example'.
> Cannot cast object 'build/generated/graphql' with class 'org.codehaus.groovy.runtime.GStringImpl' to class 'java.io.File'

Your Environment and Setup

  • graphql-java-codegen: 1.7.0
  • Build tool: Gradle 6.3
  • Java tool: 1.8

Additional context

Something else I noticed is that I'd expect there to be a default value for outputDir. The readme says the the default is None, so does that mean the plugin does nothing unless you set it?

@benmccann benmccann added the bug Something isn't working label Apr 29, 2020
kobylynskyi added a commit that referenced this issue Apr 29, 2020
@kobylynskyi
Copy link
Owner

@benmccann thanks for reporting this!
README was fixed.
And yes, outputDir is the mandatory field.

@kobylynskyi kobylynskyi self-assigned this Apr 29, 2020
@benmccann
Copy link
Contributor Author

Thanks! One more question. Is it right that these directories in the README don't match each other?

   outputDir = new File("$buildDir/generated/graphql")
sourceSets.main.java.srcDir "$buildDir/generated"

@kobylynskyi
Copy link
Owner

@benmccann It is fixed now. Thanks!
Please let me know if you will see some more inconsistencies.

kobylynskyi added a commit that referenced this issue Apr 29, 2020
* Handle duplicate fields from the type and interface #128

* Take annotations and javadoc from the type and not the interface #128

* Refactor and add some unit tests

* Simplify the code in TypeDefinitionToDataModelMapper #130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants