-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
150 lines (137 loc) · 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
/*
* Copyright (c) 2017. Jan Wiemer
*/
plugins {
id 'java'
id 'maven-publish'
id 'org.cyclonedx.bom' version '1.8.0'
}
group = "org.jacis"
version = Boolean.getBoolean("releasebuild") ? "$version" : Boolean.getBoolean("usedateversion") ? "$version" + "-build" + getDate() + "-SNAPSHOT" : "$version-SNAPSHOT"
def getDate() {
return new Date().format('yyyyMMdd') // .format('yyyyMMddHHmmss')
}
ext {
projectName = "jacis"
projectDescription = "Java ACS Store - Transient and transactional store for Java objects."
projectURL = "https://github.com/JanWiemer/jacis"
author = "Jan Wiemer"
authorId = "JanWiemer"
authorMail = "jan@wiemer.nrw"
licenseName = "Apache-2.0 License"
licenseURL = "https://github.com/JanWiemer/jacis/blob/master/LICENSE"
isReleaseVersion = Boolean.getBoolean("releasebuild")
deploy_user = System.properties.get("deployUser")
deploy_pw = System.properties.get("deployPw")
deploy_repo_release = System.properties.get("deployRepoRelease")
deploy_repo_snapshot = System.properties.get("deployRepoSnapshot")
}
print '---------- JACIS BUILD -------- '
println new Date()
println "- projectName = $projectName ($projectDescription - URL = $projectURL)"
println "- group = $group"
println "- version = $version (isReleaseVersion = $isReleaseVersion)"
println "- author = $author (mail = $authorMail)"
println "- licenseName = $licenseName (URL = $licenseURL)"
//println "- deploy_user = $deploy_user"
//println "- deploy_repo_release = $deploy_repo_release"
//println "- deploy_repo_snapshot = $deploy_repo_snapshot"
//println "- root directory = ${rootDir}"
println '------------------------------- '
dependencies {
// --- logging
implementation group: 'org.slf4j', name: 'slf4j-api', version: version_slf4j
testRuntimeOnly group: 'ch.qos.logback', name: 'logback-core', version: version_logback
testRuntimeOnly group: 'ch.qos.logback', name: 'logback-classic', version: version_logback
// --- transaction
implementation group: 'javax.transaction', name: 'jta', version: '1.1'
implementation group: 'jakarta.transaction', name: 'jakarta.transaction-api', version: '2.0.1'
// --- EXTENSION JetBrains Xodus
compileOnly group: 'org.jetbrains.xodus', name: 'xodus-openAPI', version: version_xodus
compileOnly group: 'org.jetbrains.xodus', name: 'xodus-environment', version: version_xodus
testImplementation group: 'org.jetbrains.xodus', name: 'xodus-openAPI', version: version_xodus
testImplementation group: 'org.jetbrains.xodus', name: 'xodus-environment', version: version_xodus
// --- EXTENSION microstream persistence
compileOnly group: 'org.eclipse.store', name: 'storage-embedded', version: version_eclipse_store
// --- UTILITIES
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: version_jackson
testImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: version_jackson
// --- junit
testImplementation group: 'junit', name: 'junit', version: version_junit
}
clean.doFirst {
delete "${rootDir}/var/"
delete "${rootDir}/log/"
}
repositories {
mavenLocal()
mavenCentral()
}
java {
sourceCompatibility = 11
withJavadocJar()
withSourcesJar()
}
jar {
exclude 'logback.xml'
}
jar.doFirst {
manifest {
attributes 'Implementation-Title': projectName,
'Implementation-Version': archiveVersion,
'Specification-Title': new Date(),
'Implementation-Vendor': author
}
}
test {
afterSuite { desc, result ->
if (!desc.parent)
println("${result.resultType} " +
"(${result.testCount} tests, " +
"${result.successfulTestCount} successes, " +
"${result.failedTestCount} failures, " +
"${result.skippedTestCount} skipped)")
}
}
publishing {
publications {
jacisPublication(MavenPublication) {
groupId "$group"
artifactId "$projectName"
version "$version"
from components.java
pom {
name = projectName
description = projectDescription
url = projectURL
licenses {
license {
name = licenseName
url = licenseURL
}
}
developers {
developer {
id = authorId
name = author
email = authorMail
}
}
}
}
}
repositories {
maven {
credentials {
username deploy_user
password deploy_pw
}
if (isReleaseVersion) {
url deploy_repo_release
} else {
url deploy_repo_snapshot
}
allowInsecureProtocol = true
}
}
}