-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
117 lines (97 loc) · 3.22 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
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'org.springframework.boot' version '2.6.7'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
id 'signing'
}
ext {
env = findProperty('env') ?: 'dev'
}
group 'org.opendatadiscovery'
repositories {
mavenCentral()
}
targetCompatibility = '11'
sourceCompatibility = '11'
dependencies {
api "org.opendatadiscovery:oddrn-generator-java:0.1.17"
implementation "org.opendatadiscovery:ingestion-contract-client-native:0.1.23"
compileOnly 'org.springframework.boot:spring-boot-autoconfigure'
compileOnly 'org.springframework.kafka:spring-kafka'
compileOnly 'org.apache.kafka:kafka-streams'
compileOnly 'net.devh:grpc-server-spring-boot-autoconfigure:2.11.0.RELEASE'
compileOnly 'net.devh:grpc-client-spring-boot-autoconfigure:2.11.0.RELEASE'
}
if (env == 'prod') {
signing {
sign(publishing.publications)
}
}
task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allJava
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
artifacts {
archives sourceJar, javadocJar
}
publishing {
if (env == 'prod') {
repositories {
maven {
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}
publications {
maven(MavenPublication) {
groupId = group
version = file('VERSION').text
from components.java
pom {
url = 'https://github.com/opendatadiscovery/odd-spring-boot-discoverer'
name = 'OpenDataDiscovery Spring Boot Auto Discoverer'
description = 'OpenDataDiscovery auto discoverer for Spring Boot microservices'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'ndementev'
name = 'Nikita Dementev'
organization = 'opendatadiscovery.org'
}
}
scm {
connection = 'scm:git:git://github.com/opendatadiscovery/odd-spring-boot-discoverer.git'
developerConnection = 'scm:git:git://github.com/opendatadiscovery/odd-spring-boot-discoverer.git'
url = 'https://github.com/opendatadiscovery/odd-spring-boot-discoverer'
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
username = sonatypeUsername
password = sonatypePassword
}
}
}
publish.dependsOn tasks.compileJava