-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
104 lines (82 loc) · 2.52 KB
/
Copy pathbuild.gradle
File metadata and controls
104 lines (82 loc) · 2.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
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
apply plugin: 'java'
apply plugin: 'distribution'
apply plugin: 'java-library-distribution'
apply plugin: 'os-package'
sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// NetBeans will automatically add "run" and "debug" tasks relying on the
// "mainClass" property. You may however define the property prior executing
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
//
// Note however, that you may define your own "run" and "debug" task if you
// prefer. In this case NetBeans will not add these tasks but you may rely on
// your own implementation.
if (!hasProperty('mainClass')) {
ext.mainClass = ''
}
def definedMainClass = project.hasProperty('mainClass') ? project.mainClass : ''
if (definedMainClass == null) definedMainClass = ''
definedMainClass = definedMainClass.toString()
//task debug(type: JavaExec) {
// dependsOn project.classes
// main = definedMainClass
// classpath = project.sourceSets.main.runtimeClasspath
// standardInput = System.in
//
// jvmArgs = ['-Xms128m', '-Xmx512m']
// }
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/main/resources'
include '*.properties'
}
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.netflix.nebula:gradle-ospackage-plugin:1.12.2'
}
}
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.10'
compile 'com.netflix.karyon:karyon-servo:2.1.00-RC6'
compile 'com.netflix.karyon:karyon-core:2.1.00-RC6'
compile 'com.netflix.karyon:karyon-eureka:2.1.00-RC6'
compile 'com.netflix.karyon:karyon-governator:2.1.00-RC6'
compile 'com.netflix.karyon:karyon-archaius:2.1.00-RC6'
compile 'org.codehaus.jettison:jettison:1.2'
compile 'org.slf4j:slf4j-api:1.7.0'
compile 'org.slf4j:slf4j-simple:1.7.0'
}
distributions {
main{
baseName = 'karyon-gradle'
contents {
from { 'scripts' }
}
}
}
ospackage {
version = '0.0.1'
postInstall('rm /etc/init.d/tomcat7')
def karyon = System.getenv("KARYON_OPTS")
if ( karyon ) {
println "Setting up Karyon options: \"${karyon}\""
postInstall("echo 'export JAVA_OPTS=\"${karyon}\"' >> /opt/karyon-gradle/setenv.sh")
}
from( zipTree('build/distributions/karyon-gradle.zip') ) {
into('/opt')
}
link('/etc/init/karyon-gradle.conf', '/opt/karyon-gradle/daemon.sh')
}
buildDeb.dependsOn(distZip)