Adding the graphql-dgs-codegen-client-core module#174
Conversation
|
THis needs a better name - these classes aren't utils, they are API classes that the generated code depends on. If you don't have these classes, it won't compile right? And shouldn't this be on by default if client generation is enabled? |
|
The PR also seems to include a bunch of reformatting :( |
I did had to refactor the |
I agree that names are not ideal, probably we could use |
| } | ||
| } | ||
|
|
||
| // fun apply(project: Project, optionalCodeUtilsVersion: Optional<String> = Optional.empty()) { |
There was a problem hiding this comment.
Planning on removing this. The example that is commented intended to only add the dependency of the module if the it was not explicitly present.
|
|
||
| private val pluginProperties: Optional<Properties> = try { | ||
| val props = Properties() | ||
| props.load(this.javaClass.classLoader.getResourceAsStream("META-INF/graphql-dgs-codegen-core.properties")) |
There was a problem hiding this comment.
In order to add the dependency to the client-core module I need to infer its version. To do so I'm reading the build information, as provided by the nebula.info plugin of a dependency that I know its included by the plugin, in this case the graphql-dgs-codegen-core module.
8fa4f38 to
642e471
Compare
|
Steps to follow...
|
What
====
This commit adds a new module, the `graphql-dgs-codegen-client-core`, that offers classes, and other artifacts, that complement the code generated by _DGS Codegen_.
The plugin, by default, will add the artifact automatically to the _implementation_ scope.
As a Developer
=============
As a Developer you will be able to leverage the `graphql-dgs-codegen-client-core`.
Optionally you have the option to disable the inclusion of such dependency by setting
the `codegen.clientCoreConventionsEnabled` flag to `false` as follows.
```
codegen.clientCoreConventionsEnabled = true
```
or
```
codegen {
clientCoreConventionsEnabled = true
}
```
642e471 to
4cf3426
Compare
What
This commit adds a new module, the
graphql-dgs-codegen-client-core, that offers classes, and other artifacts, that complement the code generated by DGS Codegen.The plugin, by default, will add the artifact automatically to the implementation scope.
As a Developer
As a Developer you will be able to leverage the
graphql-dgs-codegen-client-core.Optionally you have the option to disable the inclusion of such dependency by setting the
codegen.clientCoreConventionsEnabledflag tofalseas follows.or