-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
73 lines (62 loc) · 1.79 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
plugins {
checkstyle
idea
`java-gradle-plugin`
alias(libs.plugins.detekt)
alias(libs.plugins.kotlin)
alias(libs.plugins.publish)
signing
}
repositories {
mavenCentral()
}
dependencies {
detektPlugins(libs.detekt.ktlint)
implementation(libs.open.test.reporting)
implementation(libs.freemarker)
implementation(libs.snakeyaml)
testImplementation(libs.junit.jupiter)
testImplementation(libs.kotest.runner)
testImplementation(libs.kotest.assertions)
testImplementation(libs.kotest.dataset)
testRuntimeOnly(libs.junit.platform.launcher)
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
checkstyle {
configFile = rootDir.resolve("config/checkstyle.xml")
maxWarnings = 3
}
detekt {
config.from(rootDir.resolve("config/detekt.yml"))
buildUponDefaultConfig = true
}
tasks.test {
useJUnitPlatform()
}
group = "io.github.pshevche"
version = "1.0"
gradlePlugin {
website = "https://github.com/pshevche/gradle-act-plugin"
vcsUrl = "https://github.com/pshevche/gradle-act-plugin.git"
plugins.create("act") {
id = "io.github.pshevche.act"
displayName = "Plugin for validating GitHub workflows locally using 'nektos/act' runner"
description = "Plugin for validating GitHub workflows locally using 'nektos/act' runner"
tags = listOf("github", "github-workflow", "github-actions", "testing", "act")
implementationClass = "io.github.pshevche.act.ActPlugin"
}
}
signing {
isRequired = providers.environmentVariable("CI").isPresent
useInMemoryPgpKeys(
providers.environmentVariable("PGP_SIGNING_KEY").orNull,
providers.environmentVariable("PGP_SIGNING_KEY_PASSPHRASE").orNull
)
}
tasks.publishPlugins {
dependsOn(tasks.build)
}