swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

feat(gradle-plugin): enable lazy evaluation, implicit task dependencies and fixing `setEncoding`

Open nbrugger-tgm opened this issue 1 year ago • 1 comments

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 register instead of create to 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 resolve will always execute compileJava first. The advantage is that this is dynamic. If one does NOT want compileJava to be executed it won't be as soon as nothing of compileJava is on the configured classpath

nbrugger-tgm avatar Oct 17 '24 16:10 nbrugger-tgm

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

nbrugger-tgm avatar Oct 18 '24 07:10 nbrugger-tgm

Thanks @nbrugger-tgm , we'll try to take a look as soon as we can, we appreciate the code!

ponelat avatar Nov 01 '24 12:11 ponelat

Thanks!

frantuma avatar Dec 11 '24 14:12 frantuma