-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
106 lines (92 loc) · 3.23 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
// gradle attributes
group = project.property('groupId')
version = '1.1-SNAPSHOT'
java {
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
}
repositories {
mavenCentral()
}
dependencies {
// This dependency is used for CSV file parsing (read/write)
implementation group: 'org.apache.metamodel', name: 'MetaModel-core', version: '5.3.0'
implementation group: 'org.apache.metamodel', name: 'MetaModel-csv', version: '5.3.0'
// Use JUnit test framework
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.5.1'
testImplementation group: 'org.junit.platform', name: 'junit-platform-runner', version: '1.5.1'
// JSON to CSV
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
implementation group: 'com.jayway.jsonpath', name: 'json-path', version: '2.4.0'
// The apache common utils for file and string handling
testImplementation group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
testImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.0'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = project.property('artifactId')
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
packaging = 'jar'
name = project.property('name')
description = project.property('description')
url = project.property('gitUrl')
licenses {
license {
name = project.property('licenseName')
url = project.property('licenseUrl')
}
}
developers {
developer {
id = project.property('developerId')
name = project.property('developerName')
email = project.property('developerEmail')
}
}
scm {
connection = project.property('scmConnection')
developerConnection = project.property('scmDeveloperConnection')
url = project.property('gitUrl')
}
}
}
}
repositories {
maven {
url = version.endsWith('SNAPSHOT') ? project.property('snapshotsRepoUrl') : project.property('releasesRepoUrl')
credentials {
username = project.property('nexusUsername')
password = project.property('nexusPassword')
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}