-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
98 lines (85 loc) · 2.44 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
plugins {
`kotlin-dsl`
alias(libs.plugins.gradlePluginPublish)
alias(libs.plugins.nemerosaVersioning)
}
group = "com.liftric.vault"
allprojects {
version = with(versioning.info) {
if (branch == "HEAD" && dirty.not()) {
tag
} else {
full
}
}.also {
println("version=$it")
}
}
repositories {
mavenCentral()
gradlePluginPortal()
}
sourceSets {
val main by getting
val integrationMain by creating {
compileClasspath += main.output
runtimeClasspath += main.output
}
}
dependencies {
implementation(gradleApi())
implementation(kotlin("gradle-plugin"))
implementation(kotlin("stdlib-jdk8"))
implementation(libs.javaVaultDriver)
testImplementation(gradleTestKit())
testImplementation(libs.junitJupiter)
"integrationMainImplementation"(gradleTestKit())
"integrationMainImplementation"(libs.junitJupiter)
"integrationMainImplementation"(libs.javaVaultDriver)
"integrationMainImplementation"(libs.testContainersJUnit5)
"integrationMainImplementation"(libs.testContainersMain)
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
val test by existing
withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
systemProperty("org.gradle.testkit.dir", gradle.gradleUserHomeDir)
}
register<Test>("integrationTest") {
val integrationMain by sourceSets
description = "Runs the integration tests"
group = "verification"
testClassesDirs = integrationMain.output.classesDirs
classpath = integrationMain.runtimeClasspath
mustRunAfter(test)
useJUnitPlatform()
}
}
publishing {
repositories {
mavenLocal()
}
}
gradlePlugin {
website.set("https://github.com/Liftric/vault-client-plugin")
vcsUrl.set("https://github.com/Liftric/vault-client-plugin")
testSourceSets(sourceSets["integrationMain"])
plugins {
create("VaultClientPlugin") {
id = "com.liftric.vault-client-plugin"
displayName = "vault-client-plugin"
implementationClass = "com.liftric.vault.VaultClientPlugin"
description = "Read and use vault secrets in your build script"
tags.set(listOf("vault", "hashicorp", "secret"))
}
}
}