-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
65 lines (55 loc) · 1.87 KB
/
Copy pathbuild.gradle
File metadata and controls
65 lines (55 loc) · 1.87 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
plugins {
id 'java-library'
id 'com.vanniktech.maven.publish' version '0.36.0'
}
group = GROUP_ID
version = VERSION_NAME
description = POM_DESCRIPTION
repositories { mavenCentral() }
dependencies {
api 'org.json:json:20260719'
testImplementation platform('org.junit:junit-bom:6.1.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
dependencyLocking { lockAllConfigurations() }
tasks.withType(JavaCompile).configureEach {
options.release = 17
options.encoding = 'UTF-8'
options.compilerArgs += ['-Xlint:all', '-Werror']
}
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
options.addStringOption('Xdoclint:all,-missing', '-quiet')
}
tasks.named('test') {
dependsOn jar
useJUnitPlatform { excludeTags 'integration' }
systemProperty 'sdk.root', projectDir.absolutePath
doFirst {
systemProperty 'sdk.compile.classpath', files(tasks.named('jar').get().archiveFile,
configurations.runtimeClasspath).asPath
}
}
tasks.register('integrationTest', Test) {
description = 'Opt-in requests to the credential-free, stateless public mock only.'
group = 'verification'
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
useJUnitPlatform { includeTags 'integration' }
shouldRunAfter test
}
tasks.named('jar') {
manifest {
attributes('Implementation-Title': POM_NAME,
'Implementation-Version': VERSION_NAME,
'Implementation-Vendor': VENDOR_NAME,
'Automatic-Module-Name': 'com.listennotes.podcast_api')
}
}
mavenPublishing {
coordinates(GROUP_ID, POM_ARTIFACT_ID, VERSION_NAME)
publishToMavenCentral()
signAllPublications()
// POM_* metadata is read by the plugin from gradle.properties.
}