forked from clyze/metadata-model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
87 lines (72 loc) · 2.19 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
plugins {
id 'java-library'
id 'maven-publish'
id 'net.researchgate.release' version '2.6.0'
id 'com.jfrog.artifactory' version '4.24.21'
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
project.group = 'org.clyze'
wrapper {
gradleVersion = '6.7'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'commons-io:commons-io:2.7'
api 'com.fasterxml.jackson.core:jackson-databind:2.13.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
java {
withSourcesJar()
withJavadocJar()
}
javadoc.options.addBooleanOption('Xdoclint:all', true)
test {
useJUnitPlatform()
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
release {
//use defaults, see https://github.com/researchgate/gradle-release
}
afterReleaseBuild.dependsOn publish
if (project.hasProperty('artifactory_user')) {
publishing {
repositories {
maven {
credentials {
username artifactory_user
password artifactory_password
}
//Always publish to the public releases repo
url "${artifactory_contextUrl}/libs-public-release-local"
allowInsecureProtocol true
}
}
}
}
// To configure, set jfrog_user/jfrog_password in [~/.gradle,.]/gradle.properties.
// Upload with: ./gradlew artifactoryPublish
artifactoryPublish {
skip = false //Skip build info analysis and publishing (false by default)
contextUrl = 'http://clyze.jfrog.io/artifactory'
publications ('mavenJava')
properties = ['qa.level': 'basic']
clientConfig.publisher.repoKey = 'default-maven-local'
clientConfig.publisher.username = jfrog_user
clientConfig.publisher.password = jfrog_password
// Minimum file size in KB for which the plugin performs checksum deploy optimization. Default: 10. Set to 0 to disable uploading files with checksum that already exists in Artifactory.
clientConfig.publisher.minChecksumDeploySizeKb = 10
}