Application plugin lacks customization options

plugins

(Abhijit Sarkar) #1

Recently, we moved a project using a custom fat jar task to application plugin, and in the process, I discovered that it is lacking the following configuration options.

  1. The distribution is created as below

    application
    — bin
    — lib

Unless customized, the application name varies and thus, when extracted, so does the root directory. This is an issue for building a Docker image, because either the name has to be fixed in the build.gradle and referenced in the Dockerfile, which makes them tightly coupled, or the root directory has to be dynamically found using some Linux foo, which is unnecessary. It’ll be nice to have a simple option to omit the root directory in the archive .

  1. The startup script name can’t be customized without writing a bunch of code. One option that I’m using now is the following

    startScripts {
    applicationName = “startup”
    }

However, this is undesirable. First of all, I just want the script to have a particular name, I don’t really want to change the semantics of application name. Second of all, doing as above creates a script named startup; I’d have liked to name it startup.sh