-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
122 lines (108 loc) · 3.88 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
subprojects {
apply plugin: 'java-library'
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext {
r2dbcVersion = '1.0.0.M6'
reactorVersion = '3.2.5.RELEASE'
reactorExtraVersion = '3.2.2.RELEASE'
slf4jVersion = '1.7.25'
nettyVersion = '4.1.32.Final'
junitVersion = '5.3.2'
testcontainersVersion = '1.10.5'
}
repositories {
maven {
url 'https://sonatype.netifiinc.com/repository/maven-central/'
credentials {
username = "${netifiReadOnlyUsername}"
password = "${netifiReadOnlyPassword}"
}
}
maven {
url 'https://sonatype.netifiinc.com/repository/spring-milestone/'
credentials {
username = "${netifiReadOnlyUsername}"
password = "${netifiReadOnlyPassword}"
}
}
maven {
url 'https://sonatype.netifiinc.com/repository/jcenter/'
credentials {
username = "${netifiReadOnlyUsername}"
password = "${netifiReadOnlyPassword}"
}
}
}
dependencies {
api "org.slf4j:slf4j-api:$slf4jVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
testImplementation "io.projectreactor:reactor-test:$reactorVersion"
}
test {
useJUnitPlatform()
}
tasks.withType(Test) {
testLogging {
exceptionFormat "full"
events "started", "skipped", "passed", "failed"
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
plugins.withId('maven-publish') {
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
repositories {
maven {
def releasesRepoUrl = 'https://sonatype.netifiinc.com/repository/netifi-maven-releases/'
def snapshotsRepoUrl = 'https://sonatype.netifiinc.com/repository/netifi-maven-snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = "${netifiPublishUsername}"
password = "${netifiPublishPassword}"
}
}
}
}
}
plugins.withId('com.jfrog.artifactory') {
artifactory {
publish {
contextUrl = 'https://artifactory.netifiinc.com/artifactory'
repository {
repoKey = version.contains('SNAPSHOT') ? 'libs-snapshot-local' : 'libs-release-local'
// Credentials for oss.jfrog.org are a user's Bintray credentials
username = project.hasProperty('netifiArtifactoryUsername')
? project.property('netifiArtifactoryUsername')
: System.getenv('NETIFI_ARTIFACTORY_USERNAME')
password = project.hasProperty('netifiArtifactoryPassword')
? project.property('netifiArtifactoryPassword')
: System.getenv('NETIFI_ARTIFACTORY_PASSWORD')
}
defaults {
publications('mavenJava')
}
}
}
}
}