-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
91 lines (77 loc) · 2.5 KB
/
build.gradle.kts
File metadata and controls
91 lines (77 loc) · 2.5 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
import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
java
`maven-publish`
id("org.springframework.boot") version "2.2.1.RELEASE"
id("io.spring.dependency-management") version "1.0.8.RELEASE"
}
repositories {
mavenLocal()
mavenCentral()
}
subprojects {
apply(plugin = "java")
apply(plugin = "java-library")
apply(plugin = "org.springframework.boot")
apply(plugin = "io.spring.dependency-management")
apply(plugin = "maven-publish")
apply(from = rootProject.file("gradle/ktlint.gradle.kts"))
apply(from = rootProject.file("gradle/dependencies.gradle.kts"))
val lib = ext["lib"] as Map<String, String>
group = "cn.elmi.microservice"
version = "1.0.0-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation(lib.getValue("spring-boot-starter"))
implementation(lib.getValue("slf4j-api"))
implementation(lib.getValue("logback-core"))
implementation(lib.getValue("logback-classic"))
testImplementation(lib.getValue("spring-boot-starter-test"))
testImplementation(lib.getValue("junit-jupiter-api"))
testRuntimeOnly(lib.getValue("junit-jupiter-engine"))
compileOnly(lib.getValue("lombok"))
annotationProcessor(lib.getValue("lombok"))
}
the<DependencyManagementExtension>().apply {
imports {
mavenBom(SpringBootPlugin.BOM_COORDINATES)
}
}
tasks {
bootJar {
launchScript()
}
test {
failFast = true
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("${project.findProperty("GITHUB_URI")}/microservice-framework")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("PASSWORD")
}
}
}
publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
}
}
}