-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
84 lines (79 loc) · 2.33 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
// Defines a configuration for the MarkLogic modules; used by the modulesJar task below
configurations {
modules
}
task sourcesJar(type: Jar) {
description = "Create a jar of the modules to meet Maven Central's requirements for publishing"
archiveClassifier = "sources"
from "src/main/ml-modules"
destinationDirectory = file("build/libs")
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = "javadoc"
from javadoc
}
task modulesJar(type: Jar) {
description = "Jar up the marklogic-unit-test MarkLogic modules into a package that can be published"
from("src/main/ml-modules") {
into("marklogic-unit-test-modules/ml-modules")
}
destinationDirectory = file("build/libs")
archiveBaseName = "marklogic-unit-test-modules"
}
artifacts {
archives sourcesJar, javadocJar, modulesJar
}
publishing {
publications {
mainJava(MavenPublication) {
pom {
name = "${group}:${project.name}"
description = "Supports testing MarkLogic applications"
packaging = "jar"
url = "https://github.com/marklogic-community/${project.name}"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "marklogic"
name = "MarkLogic Github Contributors"
email = "[email protected]"
organization = "MarkLogic"
organizationUrl = "https://www.marklogic.com"
}
}
scm {
url = "[email protected]:marklogic-community/${project.name}.git"
connection = "scm:[email protected]:marklogic-community/${project.name}.git"
developerConnection = "scm:[email protected]:marklogic-community/${project.name}.git"
}
}
artifact sourcesJar
artifact javadocJar
artifact modulesJar
}
}
repositories {
maven {
if (project.hasProperty("mavenUser")) {
credentials {
username mavenUser
password mavenPassword
}
url publishUrl
allowInsecureProtocol = true
} else {
name = "central"
url = mavenCentralUrl
credentials {
username mavenCentralUsername
password mavenCentralPassword
}
}
}
}
}