Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed to convert old way of handling generic conf for launch4J with 3.0.X #175

Open
serge-xav opened this issue Sep 27, 2024 · 1 comment
Labels
issuer feedback More information or feedback is needed from the issuer question

Comments

@serge-xav
Copy link

Hi,
I'm trying to upgrade the plugin from 2.5 to 3.0 in our gradle/kotlin project, but I have issues with the way the shared conf is handled in our project.

Previously we add it configured this way : a val with the conf, common to all .exe we have in our different subprojects :

val confL4J = { l4jItem: Launch4jPluginExtension, fromProject: Project ->
    l4jItem.dontWrapJar = true
    l4jItem.headerType = "gui"
    l4jItem.errTitle = ""
 //.........................
    l4jItem.outputDir = rootProject.property("launch4jBuildDir").toString()

    l4jItem.outfile = fromProject.property("distributionName").toString().replace("-Client", "") + ".exe"
    l4jItem.jar = fromProject.property("archiveBaseName").toString() + ".jar"
    l4jItem.mainClassName = fromProject.property("main-class").toString()
}

and then the task definition :

launch4j {
    confL4J(this, project)
}

This is not working anymore from plugin version 3.0.0, I get multiple errors similar to :
The boolean literal does not conform to the expected type Property<Boolean!>!
As I'm not a gradle/kotlin/groovy specialist, I need help how the same could be achieved
Thanks in advance for your help

@TheBoegl
Copy link
Owner

TheBoegl commented Oct 2, 2024

With version 3 we are using properties: so you should try to set them and avoid the toString on the ones shown and map them instead.

@TheBoegl TheBoegl added question issuer feedback More information or feedback is needed from the issuer labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issuer feedback More information or feedback is needed from the issuer question
Projects
None yet
Development

No branches or pull requests

2 participants