swagger-core
swagger-core copied to clipboard
feat(gradle-plugin): enable lazy evaluation, implicit task dependencies and fixing `setEncoding`
Why
- lazy configuration: The lack cause pain when working in a remotely up to date gradle enviroment and
- fixed immutable task dependencies: this is a blocker since you have no modify theese task dependencies (resolve depending compileTestJava for example)
- setting the encoding didn't work at all
Changes
- fix encoding setter
- enable lazy evaluation by
- replacing all Task configurations with gradles Property types
- using
registerinstead ofcreateto register the task
- remove wrongly set task dependencies that can cause circular dependencies. Task dependencies are now inferred by the set classpath. When gradle detects that an output of a task (like compileJava) is used an automatic dependency is formed and
resolvewill always execute compileJava first. The advantage is that this is dynamic. If one does NOT wantcompileJavato be executed it won't be as soon as nothing of compileJava is on the configured classpath
Sorry for the force pushes, i had to fix the commit it had the wrong commiter was not signed and i messed up the commit message
Thanks @nbrugger-tgm , we'll try to take a look as soon as we can, we appreciate the code!
Thanks!