forked from oracle/okafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
202 lines (162 loc) · 6.67 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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
/*
** OKafka Java Client version 0.8.
**
** Copyright (c) 2019, 2022 Oracle and/or its affiliates.
** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
*/
buildscript {
repositories {
mavenCentral()
}
}
allprojects {
repositories {
mavenCentral()
}
group = 'org.oracle.okafka'
version = '0.8'
tasks.withType(Javadoc) {
// disable the crazy super-strict doclint tool in Java 8
// noinspection SpellCheckingInspection
options.addStringOption('Xdoclint:none', '-quiet')
options.windowTitle = "Oracle Database Transactional Event Queues Java API Reference"
options.header = """<b>Oracle® Database Transactional Event Queues Java API Reference<br>20c</b><br>F30355-02<br>"""
options.bottom = """<center><small>Copyright © 2001, 2020, Oracle and/or its affiliates. All rights reserved.<small></center><p><small><br></small></p>"""
}
}
ext {
gradleVersion = '7.3'
minJavaVersion = JavaVersion.VERSION_1_8
mavenUrl = project.hasProperty('mavenUrl') ? project.mavenUrl : ''
mavenUsername = project.hasProperty('mavenUsername') ? project.mavenUsername : ''
mavenPassword = project.hasProperty('mavenPassword') ? project.mavenPassword : ''
}
project(':clients') {
apply plugin : 'java-library'
sourceCompatibility = minJavaVersion
targetCompatibility = minJavaVersion
println 'project okafka client lib'
dependencies {
// Test dependencies
testImplementation group: 'org.easymock', name: 'easymock', version: '4.3'
testImplementation group: 'org.powermock', name: 'powermock-api-support', version: '2.0.9'
testImplementation group: 'org.powermock', name: 'powermock-api-easymock', version: '2.0.9'
testImplementation group: 'org.powermock', name: 'powermock-module-junit4', version: '2.0.9'
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.36'
// These dependencies are used by the application.
implementation group: 'com.oracle.database.jdbc', name: 'ojdbc11', version: '21.5.0.0'
implementation group: 'com.oracle.database.messaging', name: 'aqapi', version: '19.3.0.0'
implementation group: 'com.oracle.database.security', name: 'oraclepki', version: '21.5.0.0'
implementation group: 'com.oracle.database.security', name: 'osdt_core', version: '21.5.0.0'
implementation group: 'com.oracle.database.security', name: 'osdt_cert', version: '21.5.0.0'
implementation group: 'javax.jms', name: 'javax.jms-api', version: '2.0.1'
implementation group: 'javax.transaction', name: 'jta', version: '1.1'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.36'
}
javadoc {
include "**/org/oracle/okafka/clients/admin/*"
include "**/org/oracle/okafka/clients/consumer/*"
include "**/org/oracle/okafka/clients/producer/*"
include "**/org/oracle/okafka/common/*"
include "**/org/oracle/okafka/common/annotation/*"
include "**/org/oracle/okafka/common/errors/*"
include "**/org/oracle/okafka/common/resource/*"
include "**/org/oracle/okafka/common/serialization/*"
include "**/org/oracle/okafka/common/config/*"
}
tasks.named('jar') {
description('Generates okafka client jar ')
archiveBaseName = 'okafka'
from "${rootProject.projectDir}/LICENSE.txt"
from "${rootProject.projectDir}/NOTICE"
manifest {
attributes( 'Implementation-Title' : 'okafka',
'Implementation-Version': project.version)
}
}
tasks.register('fullJar', Jar) {
archiveBaseName = 'okafka'
archiveClassifier = 'full'
manifest {
attributes( 'Implementation-Title' : 'okafka',
'Implementation-Version': project.version)
}
from "${rootProject.projectDir}/LICENSE.txt"
from "${rootProject.projectDir}/NOTICE"
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
}
duplicatesStrategy 'exclude'
}
}
project(':examples:consumer') {
apply plugin : 'java'
apply plugin : 'application'
sourceCompatibility = minJavaVersion
targetCompatibility = minJavaVersion
dependencies {
// These dependencies are used by the application.
implementation project(':clients')
implementation group: 'com.oracle.database.security', name: 'oraclepki', version: '21.5.0.0'
}
tasks.named('jar') {
description('Generates okafka client consumer jar ')
archiveBaseName = 'okafka'
archiveClassifier = 'consumer'
from "${rootProject.projectDir}/LICENSE.txt"
from "${rootProject.projectDir}/NOTICE"
manifest {
attributes( 'Implementation-Title' : 'okafka consumer',
'Implementation-Version': project.version)
}
}
tasks.named('run') {
description('Run okafka client consumer')
application {
mainClass = 'org.oracle.okafka.examples.Consumer'
}
}
}
project(':examples:producer') {
apply plugin : 'java'
apply plugin : 'application'
sourceCompatibility = minJavaVersion
targetCompatibility = minJavaVersion
dependencies {
// These dependencies are used by the application.
implementation project(':clients')
implementation group: 'com.oracle.database.security', name: 'oraclepki', version: '21.5.0.0'
}
tasks.named('jar') {
description('Generates okafka client producer jar ')
archiveBaseName = 'okafka'
archiveClassifier = 'producer'
from "${rootProject.projectDir}/LICENSE.txt"
from "${rootProject.projectDir}/NOTICE"
manifest {
attributes( 'Implementation-Title' : 'okafka producer',
'Implementation-Version': project.version)
}
}
tasks.named('run') {
description('Run okafka client producer')
application {
mainClass = 'org.oracle.okafka.examples.Producer'
}
}
}
configurations {
childJar
}
dependencies {
subprojects.each {
childJar project(it.path)
}
}
task multiProjectJar (type: Jar, dependsOn: configurations.childJar) {
description 'Generates a jar containing okafka client, all its dependencies and examples for okafka demo'
from { configurations.childJar.collect { zipTree(it) } }
}