-
Notifications
You must be signed in to change notification settings - Fork 117
/
build.gradle
78 lines (65 loc) · 2.01 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
plugins {
id "com.moowork.node" version "1.1.1"
id "org.jetbrains.kotlin.jvm" version "1.1.2"
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
group 'org.andrejs'
version '0.4'
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'maven'
sourceCompatibility = 1.8
mainClassName = 'JvmMon'
dependencies {
compile 'com.eclipsesource.j2v8:j2v8_macosx_x86_64:4.6.0'
compile 'com.eclipsesource.j2v8:j2v8_linux_x86_64:4.6.0'
compile 'com.eclipsesource.j2v8:j2v8_win32_x86_64:4.6.0'
compile 'com.github.ajermakovics:jvmtop:0.8.2'
compile 'com.github.ajermakovics:json:1.2'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.2"
testCompile 'junit:junit:4.12'
testCompile files(org.gradle.internal.jvm.Jvm.current().toolsJar)
testCompile 'org.assertj:assertj-core:3.6.2'
}
jar {
manifest {
attributes 'Implementation-Title': archivesBaseName, 'Implementation-Version': version
attributes "Main-Class": mainClassName
attributes 'Class-Path': configurations.runtime.collect { it.name }.join(' ')
}
}
startScripts {
classpath = files('$APP_HOME/lib/' + jar.archiveName, '$APP_HOME/lib/tools.jar')
doLast {
def unixScriptFile = file getUnixScript()
unixScriptFile.text = file("src/main/resources/jvm-mon").text
def windowsScriptFile = file getWindowsScript()
windowsScriptFile.text = windowsScriptFile.text.replace('%APP_HOME%\\lib\\tools.jar', '%JAVA_HOME%\\lib\\tools.jar')
}
}
tasks.withType(Tar){
compression = Compression.GZIP
}
task npmDeps(type: NpmTask) {
args = ['install', 'blessed', 'blessed-contrib']
doFirst {
def node_modules = file("node_modules")
node_modules.mkdirs()
}
}
task createNodeModules(dependsOn: npmDeps) {
def node_modules = file("node_modules")
outputs.dir node_modules
}
distributions {
main {
contents {
from(createNodeModules) {
into "node_modules"
}
}
}
}