rodm / gradle-teamcity-plugin

Gradle plugin for developing TeamCity plugins
Apache License 2.0
47 stars 15 forks source link

Support a single project configuration using sourceSets #19

Open rodm opened 7 years ago

rodm commented 7 years ago

Currently each part of the a plugin has to be build using a separate Gradle sub-project. Adding a sourceSet property could allow a single project build all the components, a common/shared library, agent-side plugin and server-side plugin.

An example configuration

sourceSets {
    common
    agent
    server
}

teamcity {
    common {
        sourceSet = sourceSets.common
    }
    agent {
        sourceSet = sourceSets.agent
    }
    server {
        sourceSet = sourceSets.server
        descriptor {
            ...
        }
    }
}

Unit tests for each component will most likely require a separate source set.

Vampire commented 5 years ago

If they are real unit tests, the test cofiguration / task could be usable just fine, as they should only test single methods of single classes basically.