Adding wildcard classpath entry in launch script

In our project we are using the ‘application’ plugin to build the application zip. The plugin generates the classpath entries based on dependencies.

I would like to include a wildcard entry ‘$APP_HOME/ext-lib/*’ such that users can add extra jars to the application classpath by adding them to ext-lib folder. For this I followed the approach from [1] but somehow it is not picking up any name apart from ‘lib’

For example using below config

startScripts {
    classpath  += files('$APP_HOME/ext-lib/*')

it still generates a classpath entry like (note ‘/lib/’ instead of '/ext-lib/’)

Preformatted textCLASSPATH=$APP_HOME/lib/akka-slf4j_2.11-2.5.6.jar:$APP_HOME/lib/*:$APP_HOME/lib/akka-cluster_2.11-2.5.4.jar

I think its doing some pattern matching and resolving it against lib folder always. Possibly same issue as [2]

[2] Classpath in Application plugin is building always relative to %APP_HOME%/lib directory

For now I am going with the approach mentioned in