-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathbuild.gradle
More file actions
154 lines (134 loc) · 4.98 KB
/
build.gradle
File metadata and controls
154 lines (134 loc) · 4.98 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
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 {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// Force secure versions to fix vulnerabilities
configurations.all {
resolutionStrategy {
// Latest secure versions
force 'commons-io:commons-io:2.18.0'
force 'net.minidev:json-smart:2.5.2'
force 'com.jayway.jsonpath:json-path:2.9.0'
force 'com.google.guava:guava:33.4.0-jre'
force 'org.xmlunit:xmlunit-core:2.10.0'
}
// Exclude problematic dependencies
exclude group: 'commons-fileupload', module: 'commons-fileupload'
}
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.18.0'
implementation 'com.fasterxml.jackson.core:jackson-core:2.21.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.21.1'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.21'
api 'org.jfrog.filespecs:file-specs-java:1.1.2'
}
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
}
}