forked from reactive-commons/reactive-commons-java
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.gradle
124 lines (107 loc) · 3.68 KB
/
main.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
subprojects {
apply plugin: 'java-library'
apply plugin: 'jacoco'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/milestone' }
}
dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testCompileOnly 'org.projectlombok:lombok'
}
jacocoTestReport {
reports {
xml.enabled true
}
}
test {
useJUnitPlatform()
if (System.getProperty("env.ci").equals("true")){
systemProperty "env.ci", System.getProperty("env.ci")
}
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
}
}
if (toPublish.split(',').contains(it.name)) {
apply plugin: 'maven-publish'
apply plugin: 'signing'
ext {
groupId = 'org.reactivecommons'
pomConfig = {
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'danielbustamante'
name 'Daniel Bustamante Ospina'
email 'danibust@bancolombia.com.co'
}
}
scm {
url 'git@github.com:reactive-commons/reactive-commons-java.git'
}
}
}
group groupId
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allJava
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId = groupId
artifactId = artifactId
version = project.property('version')
pom.withXml {
def root = asNode()
root.appendNode('description', artifactDescription)
root.appendNode('name', artifactId)
root.appendNode('url', 'http://reactivecommons.org')
root.children().last() + pomConfig
}
}
}
repositories {
maven {
name = 'OSSRH'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv('MAVEN_USERNAME')
password = System.getenv('MAVEN_PASSWORD')
}
}
}
}
if (project.hasProperty('signing.keyId')) {
signing {
sign publishing.publications.mavenJava
}
}
}
}