/
base-dropwizard.gradle
39 lines (31 loc) · 1.21 KB
/
base-dropwizard.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
buildscript {
repositories { jcenter() }
dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:0.8' }
}
import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
import com.github.jengelman.gradle.plugins.shadow.transformers.ManifestResourceTransformer
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
apply plugin: com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
repositories {
mavenCentral()
}
def mainClass = project.ext.mainClass
shadow {
baseName "${project.name}"
artifactAttached false
destinationDir "${project.buildDir}/distributions"
transformer(ServiceFileTransformer)
transformer(ManifestResourceTransformer) {
attributes 'Main-Class': mainClass
attributes 'Test-Entry': 'PASSED'
}
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
task run(type: JavaExec, description: "Start application") {
classpath project.sourceSets.main.runtimeClasspath
main = mainClass
args = ["server", "config/dev.yml"]
}
task stage(dependsOn: ['shadowJar'], description: 'Stage project for Heroku')