-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
62 lines (52 loc) · 1.74 KB
/
build.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// https://docs.gradle.org/current/userguide/groovy_plugin.html
apply plugin: 'groovy'
// https://docs.gradle.org/current/userguide/codenarc_plugin.html
apply plugin: 'codenarc'
// https://docs.gradle.org/current/userguide/idea_plugin.html
apply plugin: 'idea'
// https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow
apply plugin: 'com.github.johnrengelman.shadow'
// https://docs.gradle.org/current/userguide/organizing_build_logic.html#sec:external_dependencies
buildscript {
repositories {
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.1'
}
}
// https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html#N10621
repositories {
mavenCentral()
flatDir {
dirs 'bin'
}
}
// https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html#N105E1
dependencies {
compile "org.codehaus.groovy:groovy:${groovyVersion}"
compile "io.dropwizard:dropwizard-core:${dropwizardVersion}"
compile "io.dropwizard:dropwizard-jdbi:${dropwizardVersion}"
compile "io.dropwizard:dropwizard-testing:${dropwizardVersion}"
compile ':ojdbc6_g:'
}
codenarc {
configFile = new File("config/codenarc/codenarc.groovy")
}
// TODO: version jars by commit
// https://github.com/johnrengelman/shadow
shadowJar {
manifest {
attributes 'Main-Class': "${mainClass}"
}
mergeServiceFiles()
}
build.dependsOn shadowJar
// FIXME: use ShadowJar (java -jar build/libs/web-api-skeleton-all.jar server configuration.yaml)
task run(type: JavaExec, dependsOn: build) {
main = "${mainClass}"
classpath = sourceSets.main.runtimeClasspath
args = ['server', 'configuration.yaml']
}