-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
121 lines (107 loc) · 3.52 KB
/
build.gradle.kts
File metadata and controls
121 lines (107 loc) · 3.52 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
import org.jreleaser.model.Active
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
java
id("java-library")
id("org.springframework.boot") version "4.0.3"
id("io.spring.dependency-management") version "1.1.7"
id("signing")
id("maven-publish")
id("org.jreleaser") version "1.23.0"
}
group = "io.github.manuelarte"
version = "0.0.2-SNAPSHOT"
java {
withJavadocJar()
withSourcesJar()
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
dependencies {
compileOnly("org.springframework.boot:spring-boot-starter")
compileOnly("org.springframework.boot:spring-boot-starter-web")
compileOnly("org.springframework.boot:spring-boot-starter-data-jpa")
compileOnly("org.springframework.boot:spring-boot-starter-validation")
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter")
testImplementation("org.springframework.boot:spring-boot-starter-web")
testImplementation("org.springframework.boot:spring-boot-starter-data-jpa")
testImplementation("org.springframework.boot:spring-boot-starter-validation")
testCompileOnly("org.projectlombok:lombok")
testAnnotationProcessor("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testRuntimeOnly("com.h2database:h2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.getByName<BootJar>("bootJar") {
enabled = false
}
tasks.getByName<Jar>("jar") {
enabled = true
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = groupId
artifactId = artifactId
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name = "Spring-Utils"
description = "Spring Boot utility features"
url = "https://github.com/manuelarte/spring-utils"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "manuelarte"
name = "Manuel Doncel Martos"
email = "manueldoncelmartos@gmail.com"
}
}
scm {
connection = "scm:git:git://github.com/manuelarte/spring-utils.git"
developerConnection = "scm:git:ssh://github.com/manuelarte/spring-utils.git"
url = "https://github.com/manuelarte/spring-utils/"
}
}
}
}
repositories {
maven {
url = uri(layout.buildDirectory.dir("staging-deploy"))
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}