-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
127 lines (112 loc) · 2.76 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
plugins {
id "com.jfrog.bintray" version "1.8.5"
id "maven-publish"
id 'java-library'
id 'net.nemerosa.versioning' version '3.0.0'
id 'jacoco'
id 'checkstyle'
id 'com.github.kt3k.coveralls' version '2.12.2'
}
group = 'au.com.sealink'
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
jacocoTestReport {
reports {
xml.required.set(true) // coveralls plugin depends on xml format report
html.required.set(true)
}
}
test {
testLogging {
events "failed"
exceptionFormat "full"
}
}
versioning {
branchEnv = ['TRAVIS_BRANCH', 'TRAVIS_TAG', 'TRAVIS_PULL_REQUEST_BRANCH', 'GIT_BRANCH']
}
if(versioning.info.tag == null) {
version = versioning.info.display
}
else {
version = versioning.info.tag
}
checkstyle {
toolVersion = '8.1'
}
checkstyle {
configProperties = [
'allowStaticMemberImports': 'true'
]
}
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
implementation group: 'commons-codec', name: 'commons-codec', version:'1.15'
testImplementation 'junit:junit:4.13.2'
}
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task versionInfo {
doLast {
println "Version: ${project.version}"
}
}
artifacts {
archives sourcesJar
}
def pomConfig = {
licenses {
license {
name "MIT License"
url "http://www.opensource.org/licenses/mit-license.php"
distribution "repo"
}
}
developers {
developer {
id "jmortlock"
name "John Mortlock"
email "john.mortlock@sealink.com.au"
}
}
scm {
url "https://github.com/sealink/ticket_printer.git"
}
}
publishing {
publications {
mavenPublication(MavenPublication) {
from components.java
artifact sourcesJar
groupId 'au.com.sealink'
artifactId 'printing'
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'SeaLink Print Library')
root.appendNode('name', 'SeaLink Print Library')
root.appendNode('url', 'https://github.com/sealink/ticket_printer')
root.children().last() + pomConfig
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/sealink/ticket_printer"
credentials {
username = System.getenv("GITHUB_USERNAME")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}