forked from dstengle/hello-karyon-rxnetty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
103 lines (81 loc) · 2.7 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: "com.github.hierynomus.license"
apply plugin: 'nebula.ospackage-base'
sourceCompatibility = 1.7
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}
repositories {
mavenCentral()
jcenter()
}
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.12.1"
classpath 'com.netflix.nebula:gradle-ospackage-plugin:3.1.0'
}
}
dependencies {
// Karyon core dependencies
compile (group: 'com.netflix.karyon', name: 'karyon2-core', version: '2.7.0')
compile (group: 'com.netflix.karyon', name: 'karyon2-archaius', version: '2.7.0')
// Karyon admin dependencies
compile (group: 'com.netflix.karyon', name: 'karyon2-admin', version: '2.7.0')
compile (group: 'com.netflix.karyon', name: 'karyon2-admin-web', version: '2.7.0')
// Karyon eureka dependency
compile (group: 'com.netflix.karyon', name: 'karyon2-eureka', version: '2.7.0')
// logback dependencies
compile (group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.3')
testCompile group: 'junit', name: 'junit', version: '4.+'
testCompile group: 'org.mockito', name: 'mockito-core', version: '1.10.19'
}
license {
header rootProject.file('codequality/HEADER')
ext.year = Calendar.getInstance().get(Calendar.YEAR)
include "**/*.java"
}
task run(dependsOn: [classes], type: JavaExec) {
main = "com.kenzan.karyon.rxnetty.KaryonRxNettyExample"
classpath = sourceSets.main.runtimeClasspath
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Karyon RxNetty Example app',
'Implementation-Version': version,
'Main-Class': 'com.kenzan.karyon.rxnetty.KaryonRxNettyExample'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task packDeb(type: Deb, dependsOn: fatJar) {
packageName = project.name
version = '1'
release '1'
requires('openjdk-7-jre-headless')
from('build/libs/.') {
into "/opt/${project.name}"
}
// installer scripts
preInstall = file('pkg_scripts/preInstall.sh')
postInstall = file('pkg_scripts/postInstall.sh')
postUninstall = file('pkg_scripts/postUninstall.sh')
from(file('pkg_scripts/hello-karyon-rxnetty.conf')) {
into('/etc/init')
user = 'root'
permissionGroup = 'root'
fileType = CONFIG | NOREPLACE
}
from(file('pkg_scripts/hello-karyon-rxnetty')) {
into('/etc/logrotate.d')
user = 'root'
permissionGroup = 'root'
fileType = CONFIG | NOREPLACE
}
}