Remove `toLines(` and use `toContent("""` instead
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 559
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 34
Description
It would be really convenient if our tests could use multiline string literals. Then we could remove some of this cuteness
https://github.com/diffplug/spotless/blob/aa78b56544ea55abd4cea673c7aaabb5c3da3fcc/testlib/src/main/java/com/diffplug/spotless/ResourceHarness.java#L184-L186
https://github.com/diffplug/spotless/blob/aa78b56544ea55abd4cea673c7aaabb5c3da3fcc/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ConfigurationCacheTest.java#L50-L61
Right now we test on two platforms - jdk11 and jdk17. But once #1304 gets figured out, we could run our build on Java 17, up the source level to 17 for tests, and use Gradle toolchain to run tests against jre 11 + 17.
That might be too complicated, and java 11 LTS reaches end of life in 2026 which will be here before we know it anyway. But if you made a PR that
- preserved the existing test matrix
- but always used java 17 as the build jre
- compiled bytecode to java 11 for the jars
- compiled bytecode to java 17 for the tests
That would be welcome and quickly merged!
Contributor guide
Assessment
This issue has not been assessed yet.