| apply plugin: 'application' |
| |
| mainClassName = "com.ebay.myriad.Main" |
| |
| run { |
| systemProperty "myriad.config", "build/resources/main/myriad-config-default.yml" |
| } |
| |
| dependencies { |
| compile project(':myriad-commons') |
| compile 'org.slf4j:slf4j-log4j12:1.7.7' |
| |
| } |
| |
| |
| task capsule(type: Jar, dependsOn: jar) { |
| archiveName = "myriad-executor-runnable-${version}.jar" |
| |
| from jar |
| from { configurations.runtime } |
| from { configurations.myriadExecutorConf } |
| from { sourceSets.main.resources } |
| |
| from(configurations.capsule.collect { zipTree(it) }) { include 'Capsule.class' } |
| |
| manifest { |
| attributes( |
| 'Main-Class': 'Capsule', |
| 'Application-Class': 'com.ebay.myriad.executor.MyriadExecutor', |
| 'Min-Java-Version': '1.7.0', |
| 'JVM-Args': run.jvmArgs.join(' '), |
| 'System-Properties': (run.systemProperties).collect { k, v -> "$k=$v" }.join(' ') |
| ) |
| } |
| } |
| |
| build.dependsOn capsule |