-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
76 lines (62 loc) · 1.63 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: "com.github.hierynomus.license"
apply plugin: 'nebula.ospackage-base'
group = 'mycalculator'
version = '1.0'
description = """mycalculator for testing"""
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
maven { url "http://repo.maven.apache.org/maven2" }
}
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 {
compile "org.apache.tomcat:tomcat-catalina:7.0.30+"
}
dependencies {
compile "javax.servlet:javax.servlet-api:3.+"
}
task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'com.calc.ppk.Calculator'
}
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.0
requires('openjdk-7-jre-headless')
from('build/libs/.') {
into "/opt/${project.name}"
}
preInstall = file('pkg_scripts/preInstall.sh')
postInstall = file('pkg_scripts/postInstall.sh')
postUninstall = file('pkg_scripts/postUninstall.sh')
from(jar.outputs.files) {
into 'lib'
}
from('build/scripts') {
into 'bin'
fileMode = 0550
}
from(configurations.runtime) {
into 'lib'
}
from('src/main/resources') {
fileType CONFIG | NOREPLACE
into 'conf'
}
}