-
Notifications
You must be signed in to change notification settings - Fork 154
/
build.gradle
136 lines (118 loc) · 4.25 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
buildscript {
repositories {
mavenCentral()
maven {
url "https://releases.jfrog.io/artifactory/oss-releases"
}
}
dependencies {
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '4+')
}
}
plugins {
id 'io.github.gradle-nexus.publish-plugin' version '1.0.0'
}
allprojects {
repositories {
mavenCentral()
maven {
url "https://releases.jfrog.io/artifactory/oss-releases"
}
}
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
group = 'org.jfrog.artifactory.client'
version = currentVersion
status = version.endsWith('-SNAPSHOT') ? 'integration' : 'release'
project.tasks.withType(Jar).each {
it.version = currentVersion
}
}
artifactoryPublish.skip = true
artifactory {
publish {
defaults {
publications 'main'
}
}
}
nexusPublishing {
repositories {
sonatype()
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
implementation('org.apache.httpcomponents:httpclient:4.5.13') {
exclude group: 'commons-codec', module: 'commons-codec'
}
implementation 'commons-codec:commons-codec:1.13'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.fasterxml.jackson.core:jackson-core:2.14.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.1'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.14.1'
api 'org.jfrog.filespecs:file-specs-java:1.1.1'
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
test {
useTestNG()
testLogging {
exceptionFormat "full"
events "started", "passed", "skipped", "failed", "standardOut", "standardError"
minGranularity 0
}
ignoreFailures = System.getenv("IGNORE_FAILURES") ? System.getenv("IGNORE_FAILURES").toBoolean() : false
}
publishing {
publications {
main(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().with {
appendNode('packaging', 'jar')
appendNode('name', 'artifactory-java-client')
appendNode('description', 'Java client for working with Artifactory')
appendNode('url', 'https://github.com/jfrog/artifactory-client-java')
appendNode('licenses').with {
appendNode('license').with {
appendNode('name', 'The Apache Software License, Version 2.0')
appendNode('url', 'https://www.apache.org/licenses/LICENSE-2.0')
}
}
appendNode('developers').with {
appendNode('developer').with {
appendNode('name', 'JFrog')
appendNode('email', '[email protected]')
}
}
appendNode('scm').with {
appendNode('connection', 'scm:git:git://github.com/jfrog/artifactory-client-java.git')
appendNode('developerConnection', 'scm:git:[email protected]:jfrog/artifactory-client-java.git')
appendNode('url', 'https://github.com/jfrog/artifactory-client-java')
}
}
}
}
}
}
signing {
required { !version.endsWith('-SNAPSHOT') }
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.main
}
}