forked from ConsenSysMesh/keyserver
/
build.gradle
112 lines (94 loc) · 3.29 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
classpath 'com.eriwen:gradle-js-plugin:1.12.1'
classpath 'com.eriwen:gradle-css-plugin:1.11.1'
classpath 'net.eikehirsch.react:gradle-react-plugin:0.3.1'
classpath 'de.undercouch:gradle-download-task:2.0.0'
classpath 'net.saliman:gradle-cobertura-plugin:2.2.8'
}
}
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'eclipse'
apply plugin: 'js'
apply plugin: 'css'
apply plugin: 'net.eikehirsch.react'
apply plugin: 'com.moowork.node'
apply plugin: 'de.undercouch.download'
apply plugin: 'net.saliman.cobertura'
version = 'v0.0.1'
if (!JavaVersion.current().java8Compatible) {
throw new IllegalStateException('''A Haiku:
| This needs Java 8,
| You are using something else,
| Refresh. Try again.'''.stripMargin())
}
repositories {
mavenLocal()
mavenCentral()
maven {
url = 'http://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
compile 'io.vertx:vertx-core:3.2.0'
compile 'io.vertx:vertx-unit:3.2.0'
compile 'io.vertx:vertx-web:3.2.0'
compile 'io.vertx:vertx-mongo-client:3.2.0'
compile 'org.slf4j:slf4j-api:1.7.12'
compile 'junit:junit:4.12'
runtime 'ch.qos.logback:logback-classic:1.1.3'
}
shadowJar {
classifier = 'fat'
manifest {
attributes 'Main-Class': 'net.consensys.keyserver.app.AppVerticle'
}
mergeServiceFiles {
include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
}
}
def jsSrcDir = 'src/main/resources/webroot/js'
def jsCnvDir = "${buildDir}/resources/main/webroot/js"
def jsxSrcDir = 'src/main/resources/webroot/jsx'
jsx {
sourcesDir = jsxSrcDir
destDir = jsCnvDir
}
tasks.combineJs.dependsOn tasks.jsx, npmInstall
String[] jsFiles = ["${jsSrcDir}/lib/jquery-1.11.3.min.js",
"./node_modules/react/dist/react.js",
"./node_modules/react-dom/dist/react-dom.js",
"./node_modules/react-router/umd/ReactRouter.js",
"./node_modules/react-bootstrap/dist/react-bootstrap.js",
"./node_modules/hooked-web3-provider/build/hooked-web3-provider.js",
"./node_modules/eth-lightwallet/dist/lightwallet.min.js",
"./node_modules/scrypt-async/scrypt-async.min.js",
"${jsSrcDir}/keystore-api.js",
"${jsCnvDir}/Login.js",
"${jsCnvDir}/Register.js",
"${jsCnvDir}/Dashboard.js",
"${jsCnvDir}/FrontPage.js",
"${jsCnvDir}/NavBar.js",
"${jsCnvDir}/App.js",
]
combineJs {
source = jsFiles
dest = file("${buildDir}/resources/main/webroot/app.js")
}
tasks.shadowJar.dependsOn tasks.combineJs
def cssSrcDir = 'src/main/resources/webroot/css'
String[] cssFiles = ["${cssSrcDir}/bootstrap.min.css",
"${cssSrcDir}/font-awesome.min.css",
"${cssSrcDir}/app.css",
]
combineCss {
source = cssFiles
dest = file("${buildDir}/resources/main/webroot/app.css")
}
tasks.shadowJar.dependsOn tasks.combineCss