-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
103 lines (86 loc) · 2.72 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
import java.nio.file.Files
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id "com.diffplug.spotless" version "7.0.2"
}
group = 'io.flipt'
version = '0.12.1'
description = 'Flipt Client SDK'
java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.18.2'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2'
implementation 'net.java.dev.jna:jna-platform:5.16.0'
testImplementation platform('org.junit:junit-bom:5.11.4')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
spotless {
java {
importOrder()
removeUnusedImports()
cleanthat()
googleJavaFormat()
formatAnnotations()
}
}
test {
useJUnitPlatform()
}
publishing {
publications {
maven(MavenPublication) {
artifactId = 'flipt-client-java'
from components.java
pom {
name = 'Flipt Client Java SDK'
description = 'Flipt Client Java SDK'
url = 'https://github.com/flipt-io/flipt-client-sdks/tree/main/flipt-client-java'
licenses {
license {
name = 'MIT'
url = 'https://opensource.org/license/mit/'
}
}
developers {
developer {
id = 'flipt-io'
name = 'Flipt'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/flipt-io/flipt-client-sdks.git'
developerConnection = 'scm:git:ssh://github.com/flipt-io/flipt-client-sdks.git'
url = 'https://github.com/flipt-io/flipt-client-sdks/tree/main/flipt-client-java'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username "$System.env.MAVEN_USERNAME"
password "$System.env.MAVEN_PASSWORD"
}
}
}
}
signing {
def signingKey = System.getenv('PGP_PRIVATE_KEY')
def signingPassphrase = System.getenv('PGP_PASSPHRASE')
useInMemoryPgpKeys(signingKey, signingPassphrase)
sign publishing.publications.maven
}