-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
111 lines (97 loc) · 2.95 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
110
plugins {
kotlin("jvm") version "1.8.22"
id("com.gradle.plugin-publish") version "0.14.0"
id("java-gradle-plugin")
// Security check for dependencies by task
id("org.owasp.dependencycheck") version "6.1.5"
id("com.diffplug.spotless") version "5.6.1"
id("signing")
id("maven-publish")
}
val ktLintVersion = "0.41.0"
spotless {
kotlin {
ktlint(ktLintVersion)
}
}
project.group = "net.mayope"
dependencies {
implementation("com.beust:klaxon:5.6")
api(kotlin("stdlib"))
api(kotlin("reflect"))
implementation(gradleApi())
implementation(localGroovy())
}
repositories {
mavenCentral()
}
pluginBundle {
website = "https://github.com/mayope/deployment-plugin"
vcsUrl = "https://github.com/mayope/deployment-plugin"
tags = listOf("helm", "kubernetes", "deployment", "docker")
}
gradlePlugin {
plugins {
create("deployplugin") {
group = project.group
id = "net.mayope.deployplugin"
displayName = "Mayope Deployment Plugin"
description = "Opinionated tool to deploy docker container to kubernetes using helm"
implementationClass="net.mayope.deployplugin.DeployPlugin"
}
}
}
publishing {
publications {
register("mavenJava", MavenPublication::class) {
from(components["java"])
}
}
}
val publications = project.publishing.publications.withType(MavenPublication::class.java).map {
with(it.pom) {
withXml {
val root = asNode()
root.appendNode("name", "Mayope Deployment Plugin")
root.appendNode("description", "Opinionated tool to deploy docker container to kubernetes using helm")
root.appendNode("url", "https://github.com/mayope/deployment-plugin")
}
licenses {
license {
name.set("MIT License")
url.set("https://github.com/mayope/deployment-plugin")
distribution.set("repo")
}
}
developers {
developer {
id.set("klg71")
name.set("Lukas Meisegeier")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/mayope/deployment-plugin")
connection.set("scm:git:git://github.com/mayope/deployment-plugin.git")
developerConnection.set("scm:git:ssh://[email protected]/mayope/deployment-plugin.git")
}
}
}
signing{
sign(publishing.publications["mavenJava"])
}
dependencyCheck {
failOnError = true
// https://www.first.org/cvss/specification-document#Qualitative-Severity-Rating-Scale
failBuildOnCVSS = 0.0f
analyzers.assemblyEnabled = false
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java).all {
kotlinOptions {
jvmTarget = "17"
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}