badass-jlink-plugin icon indicating copy to clipboard operation
badass-jlink-plugin copied to clipboard

Property 'mainClass' not set in 'secondaryLauncher' block

Open HGuillemet opened this issue 2 years ago • 0 comments

When defining a secondary launcher with Kotlin DSL:

jlink {
    secondaryLauncher {
        name = "my-additional-app"
        mainClass.set("org.example.MyAdditionalApp")
        args = listOf("--user", "emma")
    }
}

Gradle complains with:

Property 'mainClass' not set in 'secondaryLauncher' block

Is there something I'm doing wrong ?

BTW, the example in the documention for Kotlin DSL reads:

        mainClass = "org.example.MyAdditionalApp"

which also triggers an error:

Type mismatch: inferred type is String but Property<String!>! was expected

HGuillemet avatar Apr 02 '22 23:04 HGuillemet