Commit 13cd2e07 authored by Christian Meyer's avatar Christian Meyer
Browse files

projects can set the desired launcher version

    via property 'launcher dependency'

    uses project property 'launcherDependency'
        when adding dependency on launcher library
        if property is not found, latest version is used
parent 8678ff99
......@@ -11,6 +11,8 @@ import org.gradle.api.file.DuplicatesStrategy
* folder. It also adds start scripts for the launcher.
public class ZmtLaunchPlugin implements Plugin<Project> {
public static final def LAUNCHER_DEPENDENCY_PROPERTY_NAME = 'launcherDependency'
private static final def MAIN_CLASS_NAME = 'de.zmt.Main'
private static final def CONFIGURE = {
......@@ -61,8 +63,15 @@ public class ZmtLaunchPlugin implements Plugin<Project> {
// the launcher project is not present
else {
// add launcher dependency and make it an application
project.dependencies {
runtime 'de.zmt:zmt-launcher:latest.release'
afterEvaluate {
def launcherDependency =
// if not set by project, use latest
if (launcherDependency == null) {
launcherDependency = 'de.zmt:zmt-launcher:latest.release'
project.dependencies {
runtime launcherDependency
configure(project, MAKE_APPLICATION)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment