forked from flipt-io/flipt-server-sdks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
116 lines (95 loc) · 2.89 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id "com.diffplug.spotless" version "6.25.0"
}
group = 'io.flipt'
// x-release-please-start-version
version = '1.1.1'
// x-release-please-end
description = 'Flipt Server SDK'
repositories {
mavenCentral()
}
java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
withSourcesJar()
withJavadocJar()
}
dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.1'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
testImplementation platform('org.junit:junit-bom:5.10.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.1'
}
spotless {
java {
importOrder()
removeUnusedImports()
cleanthat()
googleJavaFormat()
formatAnnotations()
}
}
tasks.named('test', Test) {
useJUnitPlatform()
maxHeapSize = '1G'
testLogging {
events "passed"
}
}
test {
useJUnitPlatform()
}
publishing {
publications {
maven(MavenPublication) {
artifactId = 'flipt-java'
from components.java
pom {
name = 'Flipt Java SDK'
description = 'Flipt Java SDK'
url = 'https://github.com/flipt-io/flipt-server-sdks/tree/main/flipt-java'
licenses {
license {
name = 'MIT'
url = 'https://opensource.org/license/mit/'
}
}
developers {
developer {
id = 'flipt-io'
name = 'Flipt'
email = 'devs@flipt.io'
}
}
scm {
connection = 'scm:git:git://github.com/flipt-io/flipt-server-sdks.git'
developerConnection = 'scm:git:ssh://github.com/flipt-io/flipt-server-sdks.git'
url = 'https://github.com/flipt-io/flipt-server-sdks/tree/main/flipt-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
}