matrei opened a new pull request, #16708: URL: https://github.com/apache/grails-core/pull/16708
Fixes #16707 A web application generated with the `openapi` feature fails `assetCompile` (and so `bootWar` and `bootJar`) out of the box. `springdoc-openapi-starter-webmvc-ui` brings in the `org.webjars:swagger-ui` webjar, and the asset-pipeline Gradle plugin picks up every webjar on the runtime classpath. Closure Compiler can't parse the Swagger UI bundles: it reports `JSC_UNSUPPORTED_LANGUAGE_FEATURE ... Private elements` and then fails with a `StringIndexOutOfBoundsException`, which ends the asset compiler run. springdoc serves Swagger UI straight from the webjar, so the asset pipeline doesn't need it. The generated `build.gradle` now adds `'webjars/swagger-ui/**'` to `assets.excludes` when the `openapi` feature is selected. The last default entry gains a trailing comma so the conditional line can follow it, which matches the existing `includes` list. Verified by: - `OpenApiSpec`: new test asserting the excludes when `openapi` and `asset-pipeline-grails` are both selected. - `AssetPipelineSpec`: expectations updated for the trailing comma. - `./gradlew :grails-forge-core:test` and `:grails-forge-core:codeStyle` in `grails-forge`. - In an 8.0.0 app generated with `openapi`, `assetCompile` fails without the exclude and passes with it. -- 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]
