franzbecker / gradle-lombok

Gradle plugin for Lombok support
Apache License 2.0
181 stars 22 forks source link

Cannot run task installLombok on Gradle 7.3.1 #80

Open sayseakleng opened 2 years ago

sayseakleng commented 2 years ago

Hello! I'm facing an issue to run installLombok task on Gradle 7.3.1, as following description:

image

Task :verifyLombok Task :installLombok FAILED

FAILURE: Build failed with an exception.

ahamana commented 2 years ago

I encounter the same error No main class specified and classpath is not an executable jar. on DelombokTask, when I use Kotlin DSL. A workaround is as below.

import io.franzbecker.gradle.lombok.LombokPluginExtension
import io.franzbecker.gradle.lombok.task.DelombokTask

tasks.withType<DelombokTask>().configureEach {
    mainClass.set(LombokPluginExtension().main)
}

Environment

Gradle: 7.4.2 Gradle DSL: Kotlin DSL