-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
127 lines (106 loc) · 3.68 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
123
124
125
126
127
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'signing'
id "com.gradleup.nmcp" version "0.0.8"
}
group 'eu.enmeshed'
version "${System.getenv("ENMESHED_SDK_VERSION") ?: "0.0.0"}"
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
repositories {
mavenLocal()
mavenCentral()
}
ext {
feignVersion = "13.1"
feignFormVersion = "3.8.0"
jacksonVersion = "2.16.1"
lombokVersion = "1.18.30"
mockitoVersion = "5.8.0"
junitVersion = "5.10.1"
slf4jVersion = "2.0.10"
testcontainersVersion = "1.20.2"
}
dependencies {
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
implementation "io.github.openfeign:feign-core:${feignVersion}"
implementation "io.github.openfeign:feign-jackson:${feignVersion}"
implementation "io.github.openfeign.form:feign-form:${feignFormVersion}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}"
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.2'
testImplementation "org.mockito:mockito-junit-jupiter:5.14.1"
testImplementation "org.slf4j:slf4j-simple:2.0.16"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testImplementation "org.testcontainers:testcontainers:${testcontainersVersion}"
testImplementation "org.testcontainers:junit-jupiter:${testcontainersVersion}"
}
test {
useJUnitPlatform()
}
// Generating Source & Javadoc JARs for publication
// See: https://central.sonatype.org/publish/publish-gradle/
java {
withJavadocJar()
withSourcesJar()
}
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'connector-sdk'
artifacts = [jar, javadocJar, sourcesJar]
pom {
name.set("enmeshed Connector SDK")
description.set("A Java SDK for developing integrations with enmeshed using the enmeshed Connector API.")
url.set("https://github.com/nmshd/connector-java-sdk")
licenses {
license {
name.set("MIT License")
url.set("http://www.opensource.org/licenses/mit-license.php")
}
}
developers {
developer {
id.set("js-soft")
name.set("js-soft Developers")
email.set("info@js-soft.com")
}
}
scm {
connection.set("https://github.com/nmshd/connector-java-sdk")
developerConnection.set("scm:https://github.com/nmshd/connector-java-sdk.git")
url.set("scm:git@github.com:nmshd/connector-java-sdk.git")
}
}
}
}
}
signing {
def signingKey = findProperty("signingKey") ?: System.getenv("GPG_KEY")
def signingPassword = findProperty("signingKeyPassword") ?: System.getenv("GPG_KEY_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
nmcp {
publishAllProjectsProbablyBreakingProjectIsolation {
username = findProperty("sonatypeUsername") ?: System.getenv("SONATYPE_USERNAME")
password = findProperty("sonatypePassword") ?: System.getenv("SONATYPE_PASSWORD")
publicationType = "AUTOMATIC"
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(Sign).configureEach {
onlyIf("CI env is set") { providers.environmentVariable("CI").isPresent() }
}