-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle
More file actions
122 lines (107 loc) · 3.39 KB
/
Copy pathbuild.gradle
File metadata and controls
122 lines (107 loc) · 3.39 KB
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
plugins {
id("java-library")
id("maven-publish")
id("signing")
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
group = GROUP
version = VERSION_NAME
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
testImplementation 'org.mockito:mockito-core:5.4.0'
implementation platform('com.fasterxml.jackson:jackson-bom:2.21.6')
implementation 'com.fasterxml.jackson.core:jackson-core'
implementation 'com.fasterxml.jackson.core:jackson-annotations'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation 'com.squareup.okhttp3:okhttp-jvm:5.4.0'
implementation("org.json:json:20250517")
}
test {
useJUnitPlatform()
description = "Execute tests."
group = "verification"
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = GROUP
artifactId = POM_ARTIFACT_ID
version = VERSION_NAME
pom {
name = project.name
description = POM_DESCRIPTION
url = POM_URL
packaging = POM_PACKAGING
licenses {
license {
name = POM_LICENCE_NAME
url = POM_LICENCE_URL
distribution = POM_LICENCE_DIST
}
}
developers {
developer {
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
email = POM_DEVELOPER_EMAIL
}
}
organization {
name = POM_DEVELOPER_NAME
url = POM_ORGANIZATION_URL
}
scm {
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEV_CONNECTION
url = POM_URL
}
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username = System.getenv('SONATYPE_USERNAME') ?: ''
password = System.getenv('SONATYPE_PASSWORD') ?: ''
}
}
}
signing {
def signingKeyId = System.getenv('SIGNING_KEY_ID')
def signingKey = System.getenv('GPG_PRIVATE_KEY')
def signingPassword = System.getenv('SIGNING_PASSWORD')
if (signingKey) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications.mavenJava
}
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
processResources {
inputs.property 'VERSION_NAME', VERSION_NAME
filesMatching('resend-sdk.properties') {
expand(VERSION_NAME: VERSION_NAME)
}
}