dependency-analysis-gradle-plugin: buildHealth fails with Kotlin 1.8.20
Build scan link https://gradle.com/s/tj27jzavj7ixg
Plugin version 1.19.0
Gradle version 8.0.2
(Optional) Android Gradle Plugin (AGP) version N/A
Describe the bug
gradlew buildHealth fails on instances of task synthesizeDependenciesTest after I upgrade from Kotlin 1.8.10 to Kotlin 1.8.20:
Execution failed for task ':effective-kotlin:synthesizeDependenciesTest'.
> A failure occurred while executing com.autonomousapps.tasks.SynthesizeDependenciesTask$SynthesizeDependenciesWorkAction
> C:\Dev\Repos\SDKotlin\sd-kotlin-talks\effective-kotlin\build\reports\dependency-analysis\test\dependencies\() -> java.io.File?.json (The filename, directory name, or volume label syntax is incorrect)
[...]
Execution failed for task ':sorting-in-kotlin:synthesizeDependenciesTest'.
> A failure occurred while executing com.autonomousapps.tasks.SynthesizeDependenciesTask$SynthesizeDependenciesWorkAction
> C:\Dev\Repos\SDKotlin\sd-kotlin-talks\sorting-in-kotlin\build\reports\dependency-analysis\test\dependencies\() -> java.io.File?.json (The filename, directory name, or volume label syntax is incorrect)
[...]
To Reproduce Steps to reproduce the behavior:
- Run
buildHealth
Reproducer: https://github.com/sdkotlin/sd-kotlin-talks/tree/kotlin-1.8.20
Expected behavior
buildHealth succeeds.
Additional context Works with Kotlin 1.8.10. Diff: https://github.com/sdkotlin/sd-kotlin-talks/commit/5baf4b734c49860a8f62a0204f08dfee9e81e9ba#diff-697f70cdd88ba88fe77eebda60c7e143f6ad1286bca75017421e93ad84fb87dfR10.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 12
- Comments: 20 (8 by maintainers)
Commits related to this issue
- Add fix for autonomousapps/dependency-analysis-android-gradle-plugin#884 — committed to kaff4/kaff4 by Nava2 a year ago
- Add fix for autonomousapps/dependency-analysis-android-gradle-plugin#884 — committed to kaff4/kinterval-tree by Nava2 a year ago
- Bump jvm from 1.8.10 to 1.8.21 (#91) Adds fix for autonomousapps/dependency-analysis-android-gradle-plugin#884 Bumps [jvm](https://github.com/JetBrains/kotlin) from 1.8.10 to 1.8.21. - [Release ... — committed to kaff4/kaff4 by Nava2 a year ago
That is bizarre! Thanks.
There’s also a problem on Linux, but a different / related one, see here. The plugin shouldn’t try to create a file whose name contains “() -> java.io.File?” in the first place. That fails on Windows, and is odd / wrong on Linux.
Wiki updated.
Yes, the latest snapshot seems to fix this issue.
BTW, at https://github.com/autonomousapps/dependency-analysis-gradle-plugin/wiki/Adding-to-your-project it should say
+instead of${latest_version}to retrieve the latest snapshot version.Switching from
1.20.0with this error to1.20.1-SNAPSHOTis giving me a compiler error instead (when Gradle compiles my convention plugin that applies the dependency analysis plugin):Details
I tried upgrading to 1.8.22, and that seems to resolve the issue as well:
https://github.com/sdkotlin/sd-kotlin-talks/tree/0dde7c1e849d6a5262bb85a32296a9d11e9b3a19
Verified on Windows and Mac.
Here is the single issue listed as resolved in 1.8.22: https://youtrack.jetbrains.com/issue/KT-58280.
Just FYI, I upgraded Kotlin to 1.8.21 in the reproducer. No change.
I updated the reproducer to 1.20.0 and Gradle 8.1.1.
No change on Windows.
I’m getting this on Mac:
Works as expected on Mac if I downgrade to Kotlin 1.8.10.
Thanks for the issue and reproducer. Do you know if this is only reproducible on Windows?