forked from SolaceSamples/solace-samples-javarto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
81 lines (70 loc) · 2.52 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
plugins {
id 'java'
id 'eclipse'
id 'idea'
id '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-javarto'
jar {
archiveBaseName = 'solace-samples-javarto'
archiveVersion = ''
manifest {
attributes 'Implementation-Title': 'Solace JavaRTO Getting Started Samples',
'Implementation-Version': ''
}
}
repositories {
mavenCentral()
}
dependencies {
// Solace Messaging API for JavaRTO Dependencies
implementation("com.solacesystems:solclientj:10.5.0")
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
}
//tasks.withType(JavaCompile).all {
// options.compilerArgs.add("-Xlint:all")
//}
def scripts = [ 'TopicPublisher':'com.solace.samples.javarto.patterns.TopicPublisher',
'TopicSubscriber':'com.solace.samples.javarto.patterns.TopicSubscriber',
'DirectPubSub':'com.solace.samples.javarto.features.DirectPubSub',
'MessageReplay':'com.solace.samples.javarto.features.MessageReplay',
'SimpleFlowToTopic':'com.solace.samples.javarto.features.SimpleFlowToTopic',
'TopicToQueueMapping':'com.solace.samples.javarto.features.TopicToQueueMapping',
'Transactions':'com.solace.samples.javarto.features.Transactions',
'Replication':'com.solace.samples.javarto.features.Replication',
'SecureSession':'com.solace.samples.javarto.features.SecureSession',
'QueueProvision':'com.solace.samples.javarto.features.QueueProvision'
]
scripts.each() { scriptName, className ->
def t = tasks.create(name: scriptName+'StartScript', type: CreateStartScripts) {
mainClass = className
applicationName = scriptName
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtimeClasspath
defaultJvmOpts = ['-ea'] // enable assertions
}
applicationDistribution.into("bin") {
from(t)
fileMode = 0755
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
installDist {
destinationDir = new File(project.buildDir, 'staged')
}
assemble.dependsOn installDist