Failure with Application and Gradle 7.3
ccjernigan opened this issue · 2 comments
ccjernigan commented
Steps to reproduce
- Create a Kotlin multiplatform project that applies the Java application plugin
plugins {
kotlin("multiplatform")
id("application")
id("app.cash.licensee")
}
kotlin {
jvm()
}
- Build with Gradle 7.3
Results
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$DuplicateTaskException: Cannot add task 'licensee' as a task with that name already exists.
at org.gradle.api.internal.tasks.DefaultTaskContainer.failOnDuplicateTask(DefaultTaskContainer.java:257)
at org.gradle.api.internal.tasks.DefaultTaskContainer.registerTask(DefaultTaskContainer.java:398)
at org.gradle.api.internal.tasks.DefaultTaskContainer.register(DefaultTaskContainer.java:393)
at org.gradle.api.internal.tasks.DefaultTaskContainer.register(DefaultTaskContainer.java:381)
at org.gradle.api.internal.tasks.DefaultTaskContainer.register(DefaultTaskContainer.java:387)
at app.cash.licensee.LicenseePlugin.apply$lambda-8(plugin.kt:97)
Notes
The symptoms appear similar to #62 but the steps to reproduce are different. The withJava
is not necessary to reproduce this time. This time, the trigger is the combination of Gradle 7.3 and the application plugin. If I roll back to Gradle 7.2, the issue goes away. Likewise if I remove the application plugin, the issue goes away.
JakeWharton commented
I will try to build the repro tomorrow during a meeting. Hopefully the fix is equally as simple as the withJava
one.
JakeWharton commented
Fixed in 1.3.1 which should be available within the hour on Maven central.