Include Gradle Dependencies Generated At Build Time

Am trying to generate several Gradle dependencies at build time and include these for copying to the build directory but have been unsuccessful so far.

Have defined the following task to generate text for all of the dependencies and save as extra property called allAppDependencies:

task generateAllAppDependencies() {
    group appsTaskGroup
    description 'Generates app dependencies'

    def allAppDependencies = ""
    allAppDependencies += "\n\'com.trinisys.${}:${appsStandardDependenciesBase}:${appsVersionBuild}@zip\',"
    allAppNames.each { appName ->
        allAppDependencies += "\n\'com.trinisys.${}:${appName}-imports:${appsVersionBuild}@zip\',"
    project.ext.set('allAppDependencies', allAppDependencies.toString())

Running the Properties task (with the copyDependencies task further below disabled) confirms that the allAppDependencies text is generated properly for a specific scenario:


However, when including the allAppDependencies extra property as an appsCore Configuration with the dependencies definition:

dependencies {
    appsCore (

And attempting to run the now enabled copyDependencies task which references the appsCore Configuration above:

task copyDependencies(type: Copy) {
    group convergenceTaskGroup
    description 'copies all required dynamic dependencies to the build directory for the installer to access'

    from configurations.supportProduct
    from configurations.appsCore
    into "$dynamicDir"

Am getting the following Gradle error which appears to be a syntax issue as the last @zip is not recognized by the parser:

A problem occurred evaluating root project 'apps'.
  Supplied String module notation '
is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'.

When manually including the allAppDependencies generated text in the appsCore Configuration above everything works properly with no errors but this requires information not available until Gradle build time. Is there any way at all to do this?