-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
95 lines (83 loc) · 3.19 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'application'
// Don't need these task, so disabling them. Makes it possible to avoid
// declaring a single application main class.
startScripts.enabled = false
run.enabled = false
// Also don't need the regular application distribution packages since
// this is just a set of samples. So disabling to make the build output
// cleaner
distTar.enabled=false
distZip.enabled=false
applicationName = 'solace-samples-java'
version = ''
jar {
baseName = 'solace-samples-java'
version = version
manifest {
attributes 'Implementation-Title': 'Solace Getting Started Samples',
'Implementation-Version': version
}
}
// Download context sensitive help and/or source code for eclipse and idea
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
repositories {
mavenCentral()
}
dependencies {
// Solace Messaging API for Java Dependencies
compile("com.solacesystems:sol-jcsmp:10.5.0")
}
// unused, so commenting out (Issue #58)
//task createAllStartScripts() << {
// just a placeholder
//}
def scripts = [ 'guaranteedConsumer':'com.solace.samples.GuaranteedConsumer',
'guaranteedProducer':'com.solace.samples.GuaranteedProducer',
'provisionQueue':'com.solace.samples.ProvisionQueue'
/*'topicPublisher':'com.solace.samples.TopicPublisher',
'topicSubscriber':'com.solace.samples.TopicSubscriber',
'queueProducer':'com.solace.samples.QueueProducer',
'queueConsumer':'com.solace.samples.QueueConsumer',
'basicRequestor':'com.solace.samples.BasicRequestor',
'basicReplier':'com.solace.samples.BasicReplier',
'confirmedPublish':'com.solace.samples.ConfirmedPublish',
'topicToQueueMapping':'com.solace.samples.TopicToQueueMapping',
'featureMessageSelectorsOnQueue':'com.solace.samples.features.MessageSelectorsOnQueue',
'featureMessageTTLAndDeadMessageQueue':'com.solace.samples.features.MessageTTLAndDeadMessageQueue',
'featureQueueProvisionAndBrowse':'com.solace.samples.features.QueueProvisionAndBrowse',
'featureQueueProvisionAndRequestActiveFlowIndication':'com.solace.samples.features.QueueProvisionAndRequestActiveFlowIndication',
'featureTransactions':'com.solace.samples.features.Transactions',
'featureMessageReplay':'com.solace.samples.features.MessageReplay' */
]
scripts.each() { scriptName, className ->
def t = tasks.create(name: scriptName+'StartScript', type: CreateStartScripts) {
mainClassName = className
applicationName = scriptName
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
}
applicationDistribution.into("bin") {
from(t)
fileMode = 0755
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
//createAllStartScripts.dependsOn(t)
}
installDist {
destinationDir = new File(project.buildDir, 'staged')
}
assemble.dependsOn installDist