-
Notifications
You must be signed in to change notification settings - Fork 21
/
setupBuilder.gradle
147 lines (119 loc) · 3.1 KB
/
setupBuilder.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
buildscript {
repositories {
maven {
url uri('../../repo')
}
}
dependencies {
apply from: "${buildscript.sourceFile.parentFile.parentFile}/scripts/SetupBuilderVersion.gradle"
classpath 'de.inetsoftware:SetupBuilder:' + setupBuilderVersion()
}
}
repositories {
maven {
url uri('../../repo')
}
}
apply plugin: 'de.inetsoftware.setupbuilder'
apply plugin: 'java'
sourceSets {
main {
java {
srcDirs 'src'
}
}
}
setupBuilder {
application = "Setup Builder Test"
description = 'Build a test Programm.'
icons = "test-icon.icns"
vendor = 'Sample Company Inc.'
licenseFile "license_en.txt"
licenseFile {
locale = "de"
resource = "license_de.txt"
}
from jar.outputs
bundleJre = 1.8
sourceCompatibility = 1.8
targetCompatibility = 1.8
mainClass = 'com.inet.testapplication.TestLauncher'
mainJar = 'testBuilds.jar'
runBeforeUninstall {
mainClass = 'com.inet.testapplication.TestLauncher'
}
runAfter {
mainClass = 'com.inet.testapplication.TestLauncher'
mainJar = 'testBuilds.jar'
}
service {
displayName = "i-net TestLaunch Server"
id = "testservice"
}
version = "3.0"
minimumUpdateVersion "2.5"
}
configure( [ deb, rpm ] ) {
doFirst {
setupBuilder {
defaultResourceLanguage "de"
longDescription "longDesc_de.txt"
longDescription {
locale = "en"
resource = "longDesc_en.txt"
}
}
}
}
deb {
checkPackage = false
}
dmg {
preferencesLink {
title = "Testing Link"
action = "echo Hello World"
}
preferencesLink {
title = "Second Testing Link"
action = "echo Another World, hello"
}
daemonUser = "testingUser"
}
msi{
languages = ["en-us"]
//external file("fragmentDlg.wxs")
//wxsTemplate = "template.wxs"
multiInstanceCount = 10
}
dmg.dependsOn jar
deb.dependsOn jar
rpm.dependsOn jar
msi.dependsOn jar
// If the 'dmg' task is to be build, make sure that the pref pane exists as well
import org.apache.tools.ant.taskdefs.condition.Os
task preparePrefPane(type: GradleBuild) {
buildFile '../../SetupBuilderOSXPrefPane/build.gradle'
tasks = ['clean', 'uploadArchives']
processResources.dependsOn 'preparePrefPane'
onlyIf {
file(buildFile).exists() && Os.isFamily(Os.FAMILY_MAC)
}
}
// run the following task as a dependency to the "check"-task.
task runAppBundlerTest(type: GradleBuild) {
buildFile = './appBundler.gradle'
tasks = ['clean', 'bundleApp']
processResources.dependsOn 'runAppBundlerTest'
onlyIf {
file(buildFile).exists() && Os.isFamily(Os.FAMILY_MAC)
}
}
// run the following task as a dependency to the "check"-task.
task runJNLPBundlerTest(type: GradleBuild) {
buildFile = './jnlpBundler.gradle'
tasks = ['clean', 'bundleApp']
processResources.dependsOn 'runJNLPBundlerTest'
onlyIf {
file(buildFile).exists() && Os.isFamily(Os.FAMILY_MAC)
}
}