eric-maynard commented on code in PR #2005:
URL: https://github.com/apache/polaris/pull/2005#discussion_r2195108198


##########
api/iceberg-service/build.gradle.kts:
##########
@@ -109,16 +122,16 @@ openApiGenerate {
     )
 }
 
-listOf("sourcesJar", "compileJava").forEach { task ->
+listOf("sourcesJar", "compileJava", "processResources").forEach { task ->
   tasks.named(task) { dependsOn("openApiGenerate") }
 }
 
-sourceSets {
-  main { java { 
srcDir(project.layout.buildDirectory.dir("generated/src/main/java")) } }
+sourceSets { main { java { srcDir(generatedOpenApiSrcDir) } } }
+
+tasks.named<GenerateTask>("openApiGenerate") {
+  inputs.dir(templatesDir)
+  inputs.dir(specsDir)
+  actions.addFirst { delete { delete(generatedDir) } }
 }
 
 tasks.named("javadoc") { dependsOn("jandex") }
-
-tasks.named("processResources") { dependsOn("openApiGenerate") }
-
-tasks.named("openApiGenerate") { outputs.cacheIf { false } }

Review Comment:
   In fact it's not -- or at least it was not obvious to me that these two 
things were one and the same. Thanks for confirming!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to