-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
149 lines (124 loc) · 4.28 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
/* scenarioo-api
* Copyright (C) 2014, scenarioo.org Development Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* As a special exception, the copyright holders of this library give you
* permission to link this library with independent modules, according
* to the GNU General Public License with "Classpath" exception as provided
* in the LICENSE file that accompanied this code.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
group = 'org.scenarioo'
version = '3.0.0-RC1'
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation 'org.apache.commons:commons-lang3:3.0.1'
implementation 'commons-io:commons-io:1.3.2'
implementation 'commons-codec:commons-codec:1.2'
implementation 'org.slf4j:slf4j-api:1.7.31'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.2'
//These libraries are no longer provided in Java 9+, thus we need to add them manually
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1'
implementation 'com.sun.xml.bind:jaxb-impl:2.3.2'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
task javadocJar(type: Jar) {
archiveClassifier.set('javadoc')
from javadoc
}
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'Scenarioo Java'
packaging = 'jar'
description = 'Scenarioo Writer library for Java to generate Scenarioo Documentation http://www.scenarioo.org'
url = 'http://www.scenarioo.org'
scm {
connection = 'https://github.com/scenarioo/scenarioo-java.git'
developerConnection = 'https://github.com/scenarioo/scenarioo-java.git'
url = 'https://github.com/scenarioo/scenarioo-java.git'
}
licenses {
license {
name = 'GNU GENERAL PUBLIC LICENCE with linking exception'
url = 'https://github.com/scenarioo/scenarioo-java/blob/develop/LICENSE.txt'
}
}
developers {
developer {
id = 'scenarioo'
name = 'Scenarioo'
email = 'contact@scenarioo.org'
}
}
}
}
}
repositories {
maven {
if (version.contains("SNAPSHOT")) {
url "https://oss.sonatype.org/content/repositories/snapshots/"
} else {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
}
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
if (ossrhPassword) {
signing {
sign publishing.publications.mavenJava
}
}
task generateSchema(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath + sourceSets.test.runtimeClasspath
main = 'org.scenarioo.util.GenerateScenariooApiSchema'
}
jar.dependsOn generateSchema
wrapper {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = "6.7.1"
}