playframework / twirl

Twirl is Play's default template engine
Apache License 2.0
545 stars 108 forks source link

Fix format imports for Gradle/Maven #719

Closed ihostage closed 9 months ago

ihostage commented 9 months ago

OMG, it's so implicitly 🤪 Implemented here, but used in https://github.com/playframework/playframework/blob/2af8d72bb1f693dc8d7c0f66f31c20f94bcfeae6/dev-mode/play-build-link/src/main/java/play/TemplateImports.java#L24

mkurz commented 9 months ago

Is this just formatting?

mkurz commented 9 months ago

ah I see more than that

ihostage commented 9 months ago

Is this just formatting?

Yes. I added formatting imports before compilation for Gradle/Maven plugins because I missed this logic while implemented these plugins. 🤦‍♂️ Plus I modified tests to check formatting and added one public method formatImports into play.japi.twirl.compiler.TwirlCompiler.

mkurz commented 9 months ago

Will release as 2.0.3, let me check if we need to upgrade other dependencies...