-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
68 lines (56 loc) · 1.52 KB
/
build.gradle
File metadata and controls
68 lines (56 loc) · 1.52 KB
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
63
64
65
66
67
68
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}
dependencies {
classpath 'com.moowork.gradle:gradle-node-plugin:0.12'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
}
}
repositories {
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'com.moowork.node'
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'io.vertx:vertx-core:3.2.1'
compile 'io.vertx:vertx-web:3.2.1'
compile 'io.vertx:vertx-web-templ-handlebars:3.2.1'
}
npm_install {
args = ['--no-optional']
}
npm_run {
args = ['--no-optional', 'webpack']
}
processResources.dependsOn('npm_install', 'npm_run')
task copyFront(type: Copy) {
from "$sourceSets.main.resources.asPath/static"
into "$sourceSets.main.output.resourcesDir/static"
exclude "node_modules"
}
shadowJar {
mustRunAfter jar
dependsOn copyFront
destinationDir = file("$projectDir/build/shadow")
classifier = 'all'
manifest {
attributes 'Main-Class': 'io.vertx.core.Launcher'
attributes 'Main-Verticle': 'org.example.MainVerticle'
}
mergeServiceFiles {
include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
}
}
assemble.dependsOn shadowJar
task start(dependsOn: shadowJar) {
doLast {
javaexec { main = "-jar"; args += project.tasks.shadowJar.archivePath }
}
}