-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
117 lines (100 loc) · 2.95 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
105
106
107
108
109
110
111
112
113
114
115
116
117
plugins {
alias(libs.plugins.jenkins)
alias(libs.plugins.license)
alias(libs.plugins.spotless)
}
group = 'hudson.plugins.octopusdeploy'
description = 'Octopus Deploy'
defaultTasks 'build', 'checkLicenses', 'jpi'
// Exclude license tasks provided by plugin (see custom tasks 'check-licenses.gradle')
project.gradle.startParameter.excludedTaskNames = [
'licenseMain',
'licenseTest',
'licenseIntegrationTest'
]
apply from: "${rootDir}/gradle/check-licenses.gradle"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
}
dependencies {
implementation libs.bundles.octopus
implementation libs.apache.commons.collections4
implementation libs.google.gson
implementation libs.jenkins.workflow
compileOnly libs.jetbrains.annotations
testImplementation libs.bundles.junit
testImplementation libs.assertj.core
testImplementation libs.mockito.jupiter
testImplementation libs.mockito.inline
testImplementation libs.bundles.octopus
integrationTestImplementation libs.bundles.octopus
integrationTestImplementation libs.bundles.junit
integrationTestImplementation libs.assertj.core
integrationTestImplementation libs.mockito.inline
integrationTestImplementation libs.mockito.jupiter
integrationTestImplementation libs.apache.commons.text
}
jenkinsPlugin {
jenkinsVersion = '2.462.3'
shortName = 'octopusdeploy'
displayName = 'Octopus Deploy'
url = 'https://github.com/OctopusDeploy/octopus-jenkins-plugin'
gitHubUrl = 'https://github.com/OctopusDeploy/octopus-jenkins-plugin'
compatibleSinceVersion = '1.612'
fileExtension = 'hpi'
configureRepositories = true
developers {
developer {
id = 'octopusdeploy'
name = 'Octopus Deploy'
email = '[email protected]'
}
}
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
repositories {
maven { url "https://packages.octopushq.com/artifactory/maven" }
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
spotless {
groovyGradle {
target '**/*.gradle'
greclipse()
indentWithSpaces(2)
trimTrailingWhitespace()
endWithNewline()
}
}
test {
useJUnitPlatform()
}
if (file('src/integration-test').directory) {
sourceSets {
integrationTest {
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/integration-test/java')
}
resources.srcDir file('src/integration-test/resources')
}
}
task integrationTest(type: Test, dependsOn: ["compileTestJava"]) {
useJUnitPlatform()
maxParallelForks = 1 // Consider increasing this when test volume exceeds overhead of docker containers starting
group = "verification"
description = "Runs integration tests"
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
}
}