-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
139 lines (125 loc) · 3.92 KB
/
build.gradle
File metadata and controls
139 lines (125 loc) · 3.92 KB
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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java-library'
id 'distribution'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}
group = 'org.xmlobjects.xal'
version = '2.0.1'
description = 'A Java mapping for the OASIS eXtensible Address Language (xAL)'
ext.date = new Date()
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
withJavadocJar()
withSourcesJar()
}
tasks.named('compileJava') {
options.javaModuleVersion = provider { project.version }
}
repositories {
maven {
url = 'https://central.sonatype.com/repository/maven-snapshots/'
}
mavenCentral()
}
dependencies {
api 'org.xmlobjects:xml-objects:2.0.1'
annotationProcessor 'org.xmlobjects:xml-objects:2.0.1'
}
javadoc {
def name = project.name
def version = project.version
options {
overview = "$projectDir/build/tmp/javadoc/overview.html"
header = "$project.name $project.version"
bottom """
<a target="_blank" href="https://github.com/xmlobjects/xal-objects/issues">Report a bug or suggest an enhancement</a><br />
${project.name} is open source and licensed under the <a target="_blank" href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a><br />
Official website and more information at: <a target="_blank" href="https://github.com/xmlobjects/xal-objects">https://github.com/xmlobjects/xal-objects</a><br />
Copyright © 2013-${date.format('yyyy')}<br />
Claus Nagel <claus.nagel@gmail.com>
""".replaceAll("[\r|\n]+", "")
addStringOption('doctitle', project.name + ' - ' + project.description)
addStringOption('Xdoclint:none', '-quiet')
}
doFirst {
copy {
from 'resources/javadoc/overview.html'
into "$projectDir/build/tmp/javadoc"
filter(ReplaceTokens, tokens: [
name: name,
version: version
])
}
}
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version
)
}
into('META-INF') {
from 'LICENSE'
}
}
distributions.main.contents {
from 'README.md'
into('lib') {
from jar
from configurations.compileClasspath
}
into('javadoc') {
from javadoc
}
into('license') {
from 'LICENSE'
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = project.name
description = project.description
url = 'https://github.com/xmlobjects/xal-objects'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'clausnagel'
name = 'Claus Nagel'
email = 'claus.nagel@gmail.com'
roles = ['architect', 'developer']
timezone = '+1'
}
}
scm {
url = 'https://github.com/xmlobjects/xal-objects'
connection = 'scm:git:https://github.com/xmlobjects/xal-objects.git'
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}