-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
57 lines (47 loc) · 1.24 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
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
id("java")
id("org.springframework.boot") version "2.7.18"
id("io.spring.dependency-management") version "1.1.6"
id("maven-publish")
}
group = "me.letsdev"
version = "0.1.0"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
repositories {
mavenCentral()
}
dependencies {
compileOnly("org.springframework:spring-web")
}
tasks.test {
useJUnitPlatform()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
groupId = "com.github.merge-simpson"
artifactId = project.name
version = project.version.toString()
}
}
}
tasks.named("publishToMavenLocal").configure {
dependsOn("assemble")
}
tasks.named<BootJar>("bootJar") {
enabled = false
}
tasks.named<Jar>("jar") {
enabled = true
archiveClassifier.set("") // remove suffix "-plain"
// 다운로드 하려는 파일 이름: letsdev-error-code-api-0.1.0.jar
// 위 명령 누락 때 파일 이름: letsdev-error-code-api-0.1.0-plain.jar
}