forked from etendosoftware/etendo_core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
456 lines (399 loc) · 22.5 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
plugins {
id 'java'
id 'maven-publish'
id "org.sonarqube" version "2.6"
id 'war'
id 'idea'
id 'groovy'
id "me.champeau.jmh" version "0.6.5"
id 'com.etendoerp.gradleplugin' version 'latest.release'
id 'org.kordamp.gradle.jandex' version '0.11.0'
}
compileJava.options.encoding = "UTF-8"
apply from: 'tests.gradle'
apply from: "artifacts.list.COMPILATION.gradle"
repositories {
gradlePluginPortal()
mavenCentral()
maven {
url 'https://repo.futit.cloud/repository/etendo-public-jars'
}
}
/**
* Jandex is used to index the .class files containing annotations.
* This generates a file called 'jandex.inx', and is stored in the 'META-INF' dir of the core jar.
* Weld uses this file to scan all the beans when tomcat is started.
*/
jandex {
includeInJar true
}
/**
* This dependency version is equal to the one located in the 'lib/runtime' dir
*/
dependencies {
jandex 'org.jboss:jandex:2.0.5.Final'
}
final String CURRENT_VERSION = "23.4.2"
final String NEXT_RELEASE = "24.1.0"
final String NEXT_HOTFIX = "23.4.3"
final String DEV_URL = "https://repo.futit.cloud/repository/maven-snapshots/"
final String PROD_URL = uri("https://maven.pkg.github.com/etendosoftware/etendo_core/")
group = 'com.etendoerp.platform'
def versionTs = 0;
if (file('version.properties').exists()) {
def props = new Properties()
props.load(new FileInputStream(file('version.properties')))
if (props != null && props.containsKey('version.ts') && props.containsKey('version.ts')) {
versionTs = props['version.ts']
}
}
static def getVersionSuffix( versionTs ) {
def branch = ""
def proc = "git rev-parse --abbrev-ref HEAD".execute()
proc.in.eachLine { line -> branch = line }
proc.err.eachLine { line -> println line }
proc.waitFor()
if ("main" != branch && !branch.contains("release")) {
return '.' + versionTs + "-SNAPSHOT"
}
return ""
}
version = CURRENT_VERSION + getVersionSuffix( versionTs )
def artifactID = 'etendo-core'
def javaPackage = group + '.' + artifactID
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar{
archiveBaseName.set("${javaPackage}")
zip64 = true
}
jmh {
zip64 = true
}
// hack so that the jmhJar task configures the zip64 property
project.tasks.findByName("jmhJar").configure {
it.zip64 = true
it.manifest {
// make lo4j2 work in the generated jar
attributes 'Multi-Release': 'true'
}
}
sourceSets {
jmh {
java {
srcDirs 'src-jmh'
}
resources {
srcDirs 'src-jmh/resources'
}
}
}
def whiteSyncCoreList = [
'legal/**',
'lib/**',
'modules_core/**',
'referencedata/**',
'src/**',
'src-db/**',
'src-test/**',
'src-core/**',
'src-jmh/**',
'src-trl/**',
'src-util/**',
'src-wad/**',
'web/**',
'*.template',
'config/*.template',
'gradlew',
'gradle.bat',
'build.xml'
]
dependencies {
jmh group: 'org.openjdk.jmh', name: 'jmh-generator-annprocess', version: '1.28'
jmh 'org.jboss.weld.se:weld-se-core:3.1.8.Final'
jmhAnnotationProcessor('org.openjdk.jmh:jmh-generator-annprocess:1.28')
annotationProcessor('org.openjdk.jmh:jmh-generator-annprocess:1.28')
// Migrated
// database
implementation("commons-betwixt:commons-betwixt:0.8") { transitive = false } // ./src-db/database/lib/commons-betwixt-0.8.jar
implementation("org.codehaus.woodstox:wstx-asl:3.0.2") { transitive = false } // ./src-db/database/lib/wstx-asl-3.0.2.jar
implementation("apache-oro:jakarta-oro:2.1.0") { transitive = false } // ./src-db/database/lib/jakarta-oro-2.0.8.jar
implementation("commons-logging:commons-logging:1.2") { transitive = false } // ./lib/runtime/commons-logging-1.2.jar
implementation("net.sf.jasperreports:jasperreports-fonts:6.0.0") { transitive = false } // ./lib/runtime/jasperreports-fonts-6.0.0.jar
implementation("jfree:jcommon:1.0.15") { transitive = false } // ./lib/runtime/jcommon-1.0.15.jar
implementation("org.apache.logging.log4j:log4j-1.2-api:2.16.0") { transitive = false } // ./lib/runtime/log4j-1.2-api-2.16.0.jar
implementation("com.sun.xml.fastinfoset:FastInfoset:1.2.15") { transitive = false } // ./lib/runtime/FastInfoset-1.2.15.jar
implementation("org.quartz-scheduler:quartz:2.3.2") { transitive = false } // ./lib/runtime/quartz-2.3.2.jar
implementation("org.postgresql:postgresql:42.5.4") { transitive = false } // ./lib/runtime/postgresql-42.5.4.jar
implementation("org.glassfish.jaxb:jaxb-runtime:2.3.1") { transitive = false } // ./lib/runtime/jaxb-runtime-2.3.1.jar
implementation("com.sun.istack:istack-commons-runtime:3.0.7") { transitive = false } // ./lib/runtime/istack-commons-runtime-3.0.7.jar
implementation("org.apache.logging.log4j:log4j-core:2.16.0") { transitive = false } // ./lib/runtime/log4j-core-2.16.0.jar
implementation("org.slf4j:slf4j-api:1.7.25") { transitive = false } // ./lib/runtime/slf4j-api-1.7.25.jar
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.16.0") { transitive = false } // ./lib/runtime/log4j-slf4j-impl-2.16.0.jar
implementation("org.javassist:javassist:3.24.0-GA") { transitive = false } // ./lib/runtime/javassist-3.24.0-GA.jar
implementation("com.itextpdf:itext-pdfa:5.5.0") { transitive = false } // ./lib/runtime/itext-pdfa-5.5.0.jar
implementation("org.apache.poi:poi:3.10.1") { transitive = false } // ./lib/runtime/poi-3.10.1.jar
implementation("commons-fileupload:commons-fileupload:1.4") { transitive = false } // ./lib/runtime/commons-fileupload-1.4.jar
implementation("org.mozilla:rhino-engine:1.7.13") { transitive = false } // ./lib/runtime/rhino-engine-1.7.13.jar
implementation("org.apache.ant:ant:1.9.2") { transitive = false } // ./lib/runtime/ant-1.9.2.jar
implementation("org.mozilla:rhino:1.7.13") { transitive = false } // ./lib/runtime/rhino-1.7.13.jar
implementation("javax.xml.bind:jaxb-api:2.3.1") { transitive = false } // ./lib/runtime/jaxb-api-2.3.1.jar
implementation("javax.persistence:javax.persistence-api:2.2") { transitive = false } // ./lib/runtime/javax.persistence-api-2.2.jar
implementation("com.fasterxml.jackson.core:jackson-core:2.11.2") { transitive = false } // ./lib/runtime/jackson-core-2.11.2.jar
implementation("org.apache.logging.log4j:log4j-api:2.16.0") { transitive = false } // ./lib/runtime/log4j-api-2.16.0.jar
implementation("com.sun.activation:javax.activation:1.2.0") { transitive = false } // ./lib/runtime/javax.activation-1.2.0.jar
implementation("net.bytebuddy:byte-buddy:1.9.10") { transitive = false } // ./lib/runtime/byte-buddy-1.9.10.jar
implementation("org.apache.logging.log4j:log4j-web:2.16.0") { transitive = false } // ./lib/runtime/log4j-web-2.16.0.jar
implementation("com.google.guava:guava:21.0") { transitive = false } // ./lib/runtime/guava-21.0.jar
implementation("commons-dbcp:commons-dbcp:1.4") { transitive = false } // ./lib/runtime/commons-dbcp-1.4.jar
implementation("com.fasterxml:classmate:1.3.4") { transitive = false } // ./lib/runtime/classmate-1.3.4.jar
implementation("com.itextpdf:itextpdf:5.5.0") { transitive = false } // ./lib/runtime/itextpdf-5.5.0.jar
implementation("jfree:jfreechart:1.0.12") { transitive = false } // ./lib/runtime/jfreechart-1.0.12.jar
implementation("commons-io:commons-io:2.4") { transitive = false } // ./lib/runtime/commons-io-2.4.jar
implementation("org.dom4j:dom4j:2.1.3") { transitive = false } // ./lib/runtime/dom4j-2.1.3.jar
implementation("org.jvnet.staxex:stax-ex:1.8") { transitive = false } // ./lib/runtime/stax-ex-1.8.jar
implementation("commons-codec:commons-codec:1.11") { transitive = false } // ./lib/runtime/commons-codec-1.11.jar
implementation("org.apache.ant:ant-launcher:1.9.2") { transitive = false } // ./lib/runtime/ant-launcher-1.9.2.jar
implementation("commons-collections:commons-collections:3.2.2") { transitive = false } // ./lib/runtime/commons-collections-3.2.2.jar
implementation("org.codehaus.jettison:jettison:1.3") { transitive = false } // ./lib/runtime/jettison-1.3-patched.jar
implementation("com.fasterxml.jackson.core:jackson-annotations:2.11.2") { transitive = false } // ./lib/runtime/jackson-annotations-2.11.2.jar
implementation("com.fasterxml.jackson.core:jackson-databind:2.11.2") { transitive = false } // ./lib/runtime/jackson-databind-2.11.2.jar
implementation("commons-beanutils:commons-beanutils:1.8.3") { transitive = false } // ./lib/runtime/commons-beanutils-1.8.3.jar
//implementation("org.eclipse.jdt:ecj:4.17") { transitive = false } // ./lib/runtime/ecj-4.17.jar
implementation("org.freemarker:freemarker:2.3.16") { transitive = false } // ./lib/runtime/freemarker-2.3.16.jar
implementation("org.redisson:redisson:3.15.4") { transitive = false } // ./lib/runtime/redisson-3.15.4.jar
implementation("net.sourceforge.jexcelapi:jxl:2.6.10") { transitive = false } // ./lib/runtime/jxl-2.6.10.jar
implementation("commons-lang:commons-lang:2.6") { transitive = false } // ./lib/runtime/commons-lang-2.6.jar
implementation("antlr:antlr:2.7.7") { transitive = false } // ./lib/runtime/antlr-2.7.7.jar
implementation("org.apache.tika:tika-core:0.9") { transitive = false } // ./lib/runtime/tika-core-0.9.jar
implementation("com.sun.mail:javax.mail:1.6.1") { transitive = false } // ./lib/runtime/javax.mail-1.6.1.jar
implementation("commons-pool:commons-pool:1.5.6") { transitive = false } // ./lib/runtime/commons-pool-1.5.6.jar
implementation ("net.sf.jasperreports:jasperreports:6.0.0") { // ./lib/runtime/jasperreports-6.0.0.jar
transitive = false
}
implementation("commons-digester:commons-digester:1.8.1") { transitive = false } // ./lib/runtime/commons-digester-1.8.1.jar
implementation("org.glassfish.jaxb:txw2:2.3.1") { transitive = false } // ./lib/runtime/txw2-2.3.1.jar
implementation('org.hibernate.common:hibernate-commons-annotations:5.1.0.Final') { transitive = false } // ./lib/runtime/hibernate-commons-annotations-5.1.0.Final.jar
implementation('org.hibernate:hibernate-core:5.4.2.Final') { transitive = false } // ./lib/runtime/hibernate-core-5.4.2.Final.jar
implementation('xerces:xercesImpl:2.9.0') { transitive = false } // ./lib/runtime/xercesImpl.jar
implementation('javax.enterprise:cdi-api:2.0.SP1') { transitive = false } // modules_core/org.openbravo.base.weld/lib/runtime/cdi-api-2.0.SP1.jar
implementation('nekohtml:nekohtml:0.9.5') { transitive = false } // lib/runtime/nekohtml.jar
implementation('org.jboss.spec.javax.el:jboss-el-api_3.0_spec:1.0.13.Final') { transitive = false } // modules_core/org.openbravo.base.weld/lib/test/jboss-el-api_3.0_spec-1.0.13.Final.jar
implementation('org.jboss.ejb3:jboss-ejb3-api:3.1.0') { transitive = false } // modules_core/org.openbravo.base.weld/lib/test/jboss-ejb3-api-3.1.0.jar
implementation('org.jboss.logging:jboss-logging:3.3.2.Final') { transitive = false }
implementation('javax.servlet:javax.servlet-api:3.1.0') { transitive = false } // lib/build/servlet-api.jar
implementation('org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final') { transitive = false }
// modules
implementation("org.apache.httpcomponents:httpcore:4.4.9") { transitive = false } // ./modules_core/org.openbravo.client.application/lib/runtime/httpcore-4.4.9.jar
implementation("org.apache.httpcomponents:httpclient:4.5.5") { transitive = false } // ./modules_core/org.openbravo.client.application/lib/runtime/httpclient-4.5.5.jar
implementation("org.apache.httpcomponents:httpmime:4.5.5") { transitive = false } // ./modules_core/org.openbravo.client.application/lib/runtime/httpmime-4.5.5.jar
implementation("javax.inject:javax.inject:1") { transitive = false } // ./modules_core/org.openbravo.base.weld/lib/runtime/javax.inject-1.jar
implementation("com.auth0:java-jwt:3.1.0") { transitive = false } // ./modules_core/com.smf.securewebservices/lib/runtime/java-jwt-3.1.0.jar
implementation("cz.jirutka.rsql:rsql-parser:2.1.0") { transitive = false } // ./modules_core/com.smf.securewebservices/lib/runtime/rsql-parser-2.1.0.jar
// build
implementation('com.etendoerp:YUIAnt:1.0.0') { transitive = false }
implementation('rhino:js:1.6R7') { transitive = false }
implementation('org.apache.tomcat:tomcat-jdbc:9.0.37') { transitive = false }
implementation('org.jboss:jandex:2.0.5.Final') { transitive = false }
implementation('org.apache.tomcat:tomcat-juli:9.0.37') { transitive = false }
// test
testImplementation("org.reflections:reflections:0.9.11") { transitive = false } // ./modules_core/org.openbravo.base.weld/lib/test/reflections-0.9.11.jar
testImplementation("org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-base:2.0.0") { transitive = false } // ./modules_core/org.openbravo.base.weld/lib/test/shrinkwrap-descriptors-api-base-2.0.0.jar
testImplementation('com.etendoerp:jboss-ejb3-api:3.1.0') { transitive = false }
testImplementation("org.jboss.shrinkwrap.descriptors:shrinkwrap-api:1.2.6") { transitive = false } // ./modules_core/org.openbravo.base.weld/lib/test/shrinkwrap-api-1.2.6.jar
testImplementation("org.jboss.shrinkwrap.descriptors:shrinkwrap-impl-base:1.2.6") { transitive = false } // ./modules_core/org.openbravo.base.weld/lib/test/shrinkwrap-impl-base-1.2.6.jar
testImplementation("org.jboss.shrinkwrap.descriptors:arquillian-suite-extension:1.2.0") { transitive = false } // ./modules_core/org.openbravo.base.weld/lib/test/arquillian-suite-extension-1.2.0.jar
testImplementation("org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:2.0.0") { transitive = false } // ./modules_core/org.openbravo.base.weld/lib/test/shrinkwrap-descriptors-spi-2.0.0.jar
testImplementation("org.jboss.shrinkwrap:shrinkwrap-spi:1.2.6") { transitive = false } // ./modules_core/org.openbravo.base.weld/lib/test/shrinkwrap-spi-1.2.6.jar
testImplementation("junit:junit:4.12") { transitive = false } // ./lib/test/junit-4.12.jar
testImplementation("org.hamcrest:hamcrest-all:1.3") { transitive = false } // ./lib/test/hamcrest-all-1.3.jar
}
publishing {
publications {
core(MavenPublication) {
artifactId = artifactID
groupId = group
version = project.version
}
}
repositories {
maven {
url ''
}
}
}
task exportProjectVersion doLast {
ant.propertyfile(file: "version.properties") {
entry(key: "version.tag", value: project.version)
}
}
task upgradeCoreVersion {
final String RELEASE = 'release'
final String HOTFIX = 'hotfix'
doLast {
def versionType = project.hasProperty('type') ? project.getProperty('type') : RELEASE
def nextVersion
def nextRelease = NEXT_RELEASE
def nextHotfix = NEXT_HOTFIX
if (versionType == RELEASE) {
nextVersion = NEXT_RELEASE
} else if (versionType == HOTFIX) {
nextVersion = NEXT_HOTFIX
} else {
throw new GradleException("The parameter value '${versionType}' is not valid, the options should be 'release' or 'hotfix'")
}
def version = nextVersion.split("\\.")
if (version.length != 3) {
throw new GradleException("The version must be in the format major.minor.patch")
}
def files = ['src-db/database/sourcedata/AD_MODULE.xml', 'modules_core/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml']
//Update versions in AD_MODULE.xml files
for (filePath in files) {
def adModuleContent = file(filePath).text
if (!adModuleContent.contains("<VERSION><![CDATA[") && !adModuleContent.contains("<VERSION_LABEL><![CDATA[") && !adModuleContent.contains("<UPDATEINFO><![CDATA[")) {
throw new GradleException(" The format of the ${filePath} file was changed, and it will not be possible to update the versions automatically")
}
adModuleContent = adModuleContent.replaceAll(/<VERSION><!\[CDATA\[\d+.\d+.\d+/, "<VERSION><![CDATA[${version[0]}.${version[1]}.${version[2]}")
adModuleContent = adModuleContent.replaceAll(/<VERSION_LABEL><!\[CDATA\[\d+Q\d+.\d+/, "<VERSION_LABEL><![CDATA[${version[0]}Q${version[1]}.${version[2]}")
adModuleContent = adModuleContent.replaceAll(/<UPDATEINFO><!\[CDATA\[https:\/\/docs.etendo.software\/whats-new\/release-notes\/etendo-classic\/versions\/\d+Q\d+-\d+/, "<UPDATEINFO><![CDATA[https://docs.etendo.software/whats-new/release-notes/etendo-classic/versions/${version[0]}Q${version[1]}-${version[2]}")
file(filePath).write(adModuleContent)
}
// Recalculate the constants CURRENT_VERSION, NEXT_RELEASE and NEXT_HOTFIX
if (versionType == RELEASE) {
nextHotfix = "${version[0]}.${version[1]}.1"
if (version[1] == "4") {
version[0]++
version[1] = 1
} else {
version[1]++
}
nextRelease = "${version[0]}.${version[1]}.0"
} else if (versionType == HOTFIX) {
version[2]++
nextHotfix = "${version[0]}.${version[1]}.${version[2]}"
}
//Rewrite build.gradle file with new values
def buildGradleContent = file("build.gradle").text
buildGradleContent = buildGradleContent.replace("CURRENT_VERSION = \"${CURRENT_VERSION}\"", "CURRENT_VERSION = \"${nextVersion}\"")
buildGradleContent = buildGradleContent.replace("NEXT_RELEASE = \"${NEXT_RELEASE}\"", "NEXT_RELEASE = \"${nextRelease}\"")
buildGradleContent = buildGradleContent.replace("NEXT_HOTFIX = \"${NEXT_HOTFIX}\"", "NEXT_HOTFIX = \"${nextHotfix}\"")
file('build.gradle').write(buildGradleContent)
}
}
/**
* This task makes zip file, and configure publication parameters.
*/
task assembleArtifact(type: Zip) {
System.setProperty("org.gradle.internal.publish.checksums.insecure", "true")
archiveFileName = artifactID + "-" + project.version + '.zip'
destinationDirectory = file("$buildDir/libs/")
include(whiteSyncCoreList)
from "."
into "."
}
task configPublishZIP(){
doLast {
def publishTask = tasks.findByName("publishCorePublicationToMavenRepository") as AbstractPublishToMaven
publishTask.publication.artifact( file("$buildDir/libs/" + "$artifactID" + "-" + "$version"+ ".zip"))
publishTask.publication.version(project.version +'-ZIP')
if(project.version.endsWith('-SNAPSHOT')) {
publishing.repositories.maven.url = DEV_URL
publishing.repositories.maven.credentials {
username = "$nexusUser"
password = "$nexusPassword"
}
}
else {
publishing.repositories.maven.url = PROD_URL
publishing.repositories.maven.credentials {
username = "$githubUser"
password = "$githubToken"
}
}
}
}
Node generateCoreDependenciesNode() {
List<String> dependenciesCompilation = project.findProperty("dependenciesListCOMPILATION") as List<String>
List<String> dependenciesTest = project.findProperty("dependenciesListTEST") as List<String>
def dependenciesNode = new Node(null, "dependencies")
if (dependenciesCompilation) {
loadCoreDependenciesNode(dependenciesCompilation, dependenciesNode)
}
if (dependenciesTest) {
loadCoreDependenciesNode(dependenciesTest, dependenciesNode, "test")
}
return dependenciesNode
}
static void loadCoreDependenciesNode(List<String> dependencies, Node dependenciesNode, String scope = null) {
for (String dependency : dependencies) {
def splitId = dependency.split(":")
def dependencyNode = dependenciesNode.appendNode("dependency")
dependencyNode.appendNode("groupId", splitId[0])
dependencyNode.appendNode("artifactId", splitId[1])
dependencyNode.appendNode("version", splitId[2])
if (scope) {
dependencyNode.appendNode("scope", scope)
}
// Exclude transitive dependencies
dependencyNode.append(generateExclusionNode())
}
}
static Node generateExclusionNode() {
def exclusionsNode = new Node(null, "exclusions")
def exclusionNode = exclusionsNode.appendNode("exclusion")
exclusionNode.appendNode("groupId", "*")
exclusionNode.appendNode("artifactId", "*")
return exclusionsNode
}
task configPublishJAR(){
dependsOn(assembleArtifact)
doLast {
def publishTask = tasks.findByName("publishCorePublicationToMavenRepository") as AbstractPublishToMaven
publishTask.publication.artifact(file("$buildDir/libs/$artifactID-$version"+".zip"))
publishTask.publication.artifact jar
publishTask.publication.artifact sourcesJar
// Generate the dependencies node.
List<String> dependenciesCompilation = project.findProperty("dependenciesListCOMPILATION") as List<String>
List<String> dependenciesTest = project.findProperty("dependenciesListTEST") as List<String>
if (dependenciesCompilation || dependenciesTest) {
Node dependenciesNode = generateCoreDependenciesNode()
publishTask.publication.pom.withXml {
it.asNode().append(dependenciesNode)
}
}
if(project.version.endsWith('-SNAPSHOT')) {
publishing.repositories.maven.url = DEV_URL
publishing.repositories.maven.credentials {
username = "$nexusUser"
password = "$nexusPassword"
}
}
else {
publishing.repositories.maven.url = PROD_URL
publishing.repositories.maven.credentials {
username = "$githubUser"
password = "$githubToken"
}
}
}
}
task publishCoreJar(dependsOn: [sourcesJar, jar, configPublishJAR, publishCorePublicationToMavenRepository]) {
mustRunAfter sourcesJar, jar
}
//Deprecated
task publishCoreZip(dependsOn: [assembleArtifact,configPublishZIP, publishCorePublicationToMavenRepository]) { }
idea {
module {
excludeDirs += [file('${env.CATALINA_HOME}'), file('.githooks'), file('.idea'), file('.settings'), file('.build.apply')]
}
}
task call_sass(type: Exec) {}
task deploySkin (dependsOn: ["cssCompile", "deploy.skin"]) doLast {
}
task djmh(type: JavaExec, dependsOn: jmhCompileGeneratedClasses) {
mainClass = project.hasProperty("benchmark") ? project.getProperty("benchmark") : null
classpath = sourceSets.jmh.compileClasspath + sourceSets.jmh.runtimeClasspath
}
ant.lifecycleLogLevel = "INFO"