Skip to content

Commit 32418ee

Browse files
authored
Clean openApiGenerate output dir before generating (#2502)
This commit fixes a problem in the Solr build whereby files generated from our OpenAPI spec could "leak" between branches and cause compilation issues. In short, generated SolrRequest implementations were not being overwritten or cleaned up after switching branches. This caused compilation problems whenever the new branch didn't have other classes (typically 'model' POJOs) that the generated file relied on. This commit uses the openApiGenerate task's "cleanupOutput" option to prevent this from happening.
1 parent 2636567 commit 32418ee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

solr/solrj/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ openApiGenerate {
132132
generateModelTests = false
133133
generateApiDocumentation = false
134134
generateModelDocumentation = false
135+
cleanupOutput = true
135136
additionalProperties = ["modelPackage": "org.apache.solr.client.api.model"]
136137
}
137138

0 commit comments

Comments
 (0)