I'm using the Gradle Kotlin DSL with the plugin id("edu.sc.seis.launch4j") version "2.5.4"
I can create one Launch4j executable with no problem with a launch4j{} block, but when I try to create a second one with the Launch4jLibraryTask
tasks.register<Launch4jLibraryTask>("createSecondExe") {
//implementation
}
I get the following error
* What went wrong:
Could not determine the dependencies of task 'createAllExecutables'.
> Could not create task 'createSecondExe'.
> Could not create task of type 'Launch4jLibraryTask'.
> Cannot run Project.afterEvaluate(Closure) when the project is already evaluated.
I can see in their repo here that Project.afterEvaluate() is run when creating the task. But is there any way to avoid this error? It's failing on the creation of the task. This one has really got me stumped.
I'm following these inscructions: https://github.com/TheBoegl/gradle-launch4j#launch4jlibrarytask
Any advice? Thank you in advance.