-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
161 lines (133 loc) · 4.89 KB
/
build.gradle
File metadata and controls
161 lines (133 loc) · 4.89 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
import java.text.SimpleDateFormat
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'org.jreleaser' version '1.21.0'
}
ext {
copyright = '2019-2025 Ipregistry'
}
group = 'co.ipregistry'
version = '6.0.0'
description = 'Official Java client for Ipregistry, a fast, reliable IP geolocation and threat data API.'
repositories {
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-Xlint:deprecation'
}
jar {
manifest {
attributes(
'Built-By': System.properties['user.name'],
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()),
'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Build-OS': "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}",
'Created-By': 'Gradle ${gradle.gradleVersion}',
'Name': 'co/ipregistry/api/client/',
'Specification-Title': 'Ipregistry Client',
'Specification-Version': project.version,
'Specification-Vendor': 'Ipregistry',
'Implementation-Title': 'co.ipregistry.api.client',
'Implementation-Version': project.version,
'Implementation-Vendor': 'Ipregistry',
)
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
samples {
compileClasspath += main.output + main.compileClasspath
runtimeClasspath += main.output + main.runtimeClasspath
}
}
configurations {
integrationTestImplementation.extendsFrom implementation
integrationTestRuntimeOnly.extendsFrom runtimeOnly
}
dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.42'
compileOnly 'org.projectlombok:lombok:1.18.42'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.20.1'
implementation 'com.google.guava:guava:33.5.0-jre'
implementation 'org.apache.httpcomponents.client5:httpclient5-fluent:5.5.1'
implementation 'com.maxmind.db:maxmind-db:4.0.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:6.0.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:6.0.1'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.mockito:mockito-core:5.20.0'
integrationTestImplementation 'io.rest-assured:rest-assured:5.5.6'
integrationTestImplementation 'org.junit.jupiter:junit-jupiter-api:6.0.1'
integrationTestRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:6.0.1'
integrationTestRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.register('integrationTest', Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
shouldRunAfter test
}
check.dependsOn integrationTest
test {
useJUnitPlatform()
}
integrationTest {
useJUnitPlatform()
}
publishing {
publications {
maven(MavenPublication) {
groupId = 'co.ipregistry'
artifactId = 'ipregistry-client'
from components.java
pom {
name = 'Ipregistry Client'
description = 'Official Java client for Ipregistry, a fast, reliable IP geolocation and threat data API.'
url = 'https://github.com/ipregistry/ipregistry-java'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'Ipregistry Team'
organizationUrl = 'https://ipregistry.co'
}
}
scm {
connection = 'scm:git:git://github.com/ipregistry/ipregistry-java.git'
developerConnection = 'scm:git:ssh://github.com:ipregistry/ipregistry-java.git'
url = 'https://github.com/ipregistry/ipregistry-java/tree/main'
}
}
}
}
repositories {
maven {
url = layout.buildDirectory.dir('staging-deploy')
}
}
}
// No signing configuration in build.gradle - JReleaser will handle it
jreleaser {
configFile = file('jreleaser.yml')
}