-
Notifications
You must be signed in to change notification settings - Fork 93
/
build.gradle
85 lines (69 loc) · 2.69 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
apply plugin: 'java'
apply from: "https://raw.githubusercontent.com/gocd/gocd-plugin-gradle-task-helpers/master/helper.gradle?_=${(int) (new Date().toInstant().epochSecond / 60)}"
gocdPlugin {
id = 'yaml.config.plugin'
pluginVersion = '1.0.0'
goCdVersion = '22.1.0'
name = 'YAML Configuration Plugin'
description = 'GoCD pipelines and environments configuration in YAML'
vendorName = 'Tomasz Setkowski'
vendorUrl = 'https://github.com/tomzo/gocd-yaml-config-plugin'
githubRepo {
owner = System.getenv('GITHUB_USER') ?: 'bob'
repo = 'gocd-yaml-config-plugin'
token = System.getenv('GITHUB_TOKEN') ?: 'bad-token'
}
pluginProject = project
prerelease = !"No".equalsIgnoreCase(System.getenv('PRERELEASE'))
assetsToRelease = [project.tasks.jar]
}
group = 'cd.go.plugin.config.yaml'
version = gocdPlugin.fullVersion(project)
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
ext {
pluginApiVersion = '24.4.0'
}
dependencies {
implementation group: 'com.google.code.gson', name: 'gson', version: '2.11.0'
implementation group: 'org.apache.ant', name: 'ant', version: '1.10.15'
implementation group: 'com.beust', name: 'jcommander', version: '1.82'
implementation group: 'com.contrastsecurity', name: 'yamlbeans', version: '1.17'
implementation group: 'org.yaml', name: 'snakeyaml', version: '2.3'
compileOnly "cd.go.plugin:go-plugin-api:$pluginApiVersion"
testImplementation "cd.go.plugin:go-plugin-api:$pluginApiVersion"
testImplementation platform('org.junit:junit-bom:5.11.4')
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine'
testRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-launcher'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.14.2'
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '3.0'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed", "standardOut"
}
}
// create a fat jar with all dependencies
jar {
archiveBaseName = project.name
preserveFileTimestamps = false
reproducibleFileOrder = true
duplicatesStrategy = DuplicatesStrategy.INCLUDE
manifest {
attributes 'Main-Class': 'cd.go.plugin.config.yaml.cli.YamlPluginCli'
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
exclude "allow.class" // Noise from Ant
exclude "META-INF/*.txt"
exclude "META-INF/*.LIST"
exclude "META-INF/versions/**"
}