How to configure layout and pidFile name using gradle 4.1

Hi,

Currently I moved in gradle 3.5 to 4.1 version and some of configure tags are not working.
how to define default functionality for pidfile and layout under springBoot.

code is working with 3.5 version

springBoot {
mainClass = ‘com.MainApplication’
layout = ‘ZIP’
executable = true
embeddedLaunchScriptProperties =
[
initInfoShortDescription: project.name,
initInfoProvides: jar.baseName,
mode: ‘service’,
pidFilename: ‘app.pid’,
]
}

getting below error

  • What went wrong:
    A problem occurred evaluating root project ‘app’.

    Cannot set the value of read-only property ‘layout’ for root project ‘app’ of type org.gradle.api.Project.

I think, got answer for Pidfile creation.

bootJar {
mainClassName = ‘com.app’
launchScript {
properties initInfoShortDescription: project.name,
initInfoProvides: jar.baseName,
mode: ‘service’,
pidFilename: ‘app.pid’
}
}

still trying to find layout issue.

What is layout = ‘ZIP’ supposed to do?

If you want to build a zip distribution, I think you are supposed to use the application plugin and run the bootDistZip task.