Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Feature Request: Spawn (test) dependency #7

Description

@matsev

It would be good to be able to declare a third party dependency (either as compile or testCompile dependency) and be able to spawn it. The third party dependency may in turn have several dependencies on its own, so the gradle-spawn-plugin needs to traverse all transitive dependencies recursively and add them to the classpath.

Below is example of how it would be used (the syntax and naming are just suggestions):

import com.wiredforcode.gradle.spawn.*

buildscript {
    repositories {
        ...
        maven { url 'http://dl.bintray.com/vermeulen-mp/gradle-plugins' }
    }
    dependencies {
        classpath 'com.wiredforcode:gradle-spawn-plugin:0.6.0'
    }
}

dependencies {
    testCompile("com.example.dependency:third-party-jar:1.0.0")
}

apply plugin: 'com.wiredforcode.spawn'

task startServer(type: SpawnProcessTask, dependsOn: 'assemble') {
    artifactId 'third-party-jar' // name act as a predicate to select which artifact to be executed
    commandLineArgs '[optional string of command line args]'
    ready 'Started Application'
}

task stopServer(type: KillProcessTask)

test.dependsOn startServer

test.finalizedBy stopServer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions