-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
109 lines (97 loc) · 3.23 KB
/
build.gradle.kts
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
plugins {
id("java-library")
id("org.sonarqube") version "4.4.1.3373"
id("maven-publish")
id("signing")
}
group = "org.flmelody"
version = "1.0.1-spring6"
repositories {
mavenCentral()
}
dependencies {
implementation(libs.guava)
compileOnly(libs.spring.boot.web)
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withJavadocJar()
withSourcesJar()
}
sonar {
properties {
property("sonar.projectKey", "Flmelody_spring-method-parameter-resolver")
property("sonar.organization", "flmelody")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.gradle.skipCompile", true)
}
}
tasks.jar {
manifest {
attributes(
mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Compiled-Spring-Boot-Version" to libs.versions.spring.boot.version.get()
)
)
}
}
tasks.test {
useJUnitPlatform()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = "org.flmelody"
artifactId = "spring-method-parameter-resolver"
this.version = version
from(components["java"])
pom {
name.set("spring-method-parameter-resolver")
description.set("Enhanced spring parameter binding extensions")
url.set("https://github.com/Flmelody/spring-method-parameter-resolver")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("esotericman")
name.set("esotericman")
}
}
scm {
connection.set("scm:git:git:github.com/Flmelody/spring-method-parameter-resolver.git")
developerConnection.set("scm:git:ssh://github.com/Flmelody/spring-method-parameter-resolver.git")
url.set("https://github.com/Flmelody/spring-method-parameter-resolver.git")
}
}
}
}
repositories {
maven {
name = "OSSRH"
val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = project.properties["username"] as String?
password = project.properties["password"] as String?
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as? StandardJavadocDocletOptions)?.addBooleanOption("html5", true)
}
}