-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
145 lines (123 loc) · 2.85 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
plugins {
id "com.github.ben-manes.versions"
}
wrapper {
gradleVersion = '8.10'
}
tasks.register('examples') {
dependsOn gradle.includedBuilds*.task(':build')
}
subprojects {
repositories {
mavenCentral()
gradlePluginPortal()
}
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'java-library-distribution'
apply plugin: 'signing'
apply plugin: 'maven-publish'
version = libs.versions.fta.get()
group = "com.cobber.fta"
compileJava {
options.release = 11
}
java {
withSourcesJar()
withJavadocJar()
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
jacoco {
toolVersion = libs.versions.jacoco.get()
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
}
artifacts {
archives javadocJar, sourcesJar
}
jar {
manifest {
attributes(
'Build-Timestamp': new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()),
'Implementation-Version': archiveVersion
)
}
}
javadoc {
options.encoding = "UTF-8"
options.noQualifiers 'java.lang:java.util:com.cobber.fta:com.cobber.fta.core'
}
test {
// enable TestNG support (default is JUnit)
def groups = System.getProperty('groups', 'all')
useTestNG() {
includeGroups groups
}
dependsOn cleanTest
testLogging.showStandardStreams = true
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
publishing {
repositories {
maven {
name = "ossrh"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}
publications {
mavenJava(MavenPublication) {
switch(artifactId) {
case 'core':
artifactId = 'fta-core'
break
case 'types':
artifactId = 'fta'
break
default:
break
}
from components.java
pom {
name = 'Fast Text Analyzer'
packaging = 'jar'
description = 'Analyze Text data to determine simple type and Semantic type information as well as other key metrics associated with a text stream.'
url = 'https://github.com/tsegall/fta'
scm {
connection = 'scm:git:https://github.com/tsegall/fta.git'
developerConnection = 'scm:git:https://github.com/tsegall/fta.git'
url = 'https://github.com/tsegall/fta.git'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'tsegall'
name = 'Tim Segall'
email = 'xtim@cobber.com'
}
}
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
}