This repository has been archived by the owner on Jul 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (88 loc) · 2.84 KB
/
build.gradle
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
plugins {
id 'com.github.spotbugs' version "${spotbugsPluginVersion}"
id 'com.gtramontina.ghooks.gradle' version "${ghooksPluginVersion}"
id 'org.springframework.boot' version "${springBootPluginVersion}"
id 'java'
id 'java-library'
id 'maven-publish'
}
group = 'com.jrmcdonald'
version = "${version}"
sourceCompatibility = '11'
targetCompatibility = '11'
repositories {
mavenCentral()
maven {
url = 'https://maven.pkg.github.com/jrmcdonald/ms-common'
credentials {
username = "jrmcdonald"
password = project.findProperty('GITHUB_TOKEN') ?: System.getenv("GITHUB_TOKEN")
}
}
}
configurations {
commonBom
compileOnly.extendsFrom(commonBom)
annotationProcessor.extendsFrom(commonBom)
testCompileOnly.extendsFrom(commonBom)
testAnnotationProcessor.extendsFrom(commonBom)
implementation.extendsFrom(commonBom)
testImplementation.extendsFrom(commonBom)
testFixturesImplementation.extendsFrom(commonBom)
[apiElements, runtimeElements].each {
it.outgoing.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(jar) }
it.outgoing.artifact(bootJar)
}
}
dependencies {
commonBom platform("com.jrmcdonald:ms-common-bom:${commonVersion}")
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation 'com.github.spotbugs:spotbugs-annotations'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-kubernetes-all'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.force66:BeanTester'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
compileJava {
options.compilerArgs << "-Werror"
options.compilerArgs << "-Xlint:all"
options.compilerArgs << "-Xlint:-try"
options.compilerArgs << "-Xlint:-processing"
}
bootJar {
enabled = true
}
bootBuildImage {
imageName = "jrmcdonald/techbyte-demo:${project.version}"
}
jar {
enabled = false
}
test {
useJUnitPlatform()
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/jrmcdonald/ifsc-ical-generator")
credentials {
username = "jrmcdonald"
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
bootJava(MavenPublication) {
artifact bootJar
}
}
}
apply from: "${rootDir}/gradle/quality.gradle"