generated from creek-service/single-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
92 lines (79 loc) · 4.07 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
/*
* Copyright 2022-2023 Creek Contributors (https://github.com/creek-service)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
java
jacoco
`creek-common-convention`
`creek-coverage-convention`
`creek-plugin-publishing-convention`
`creek-sonatype-publishing-convention`
id("com.gradle.plugin-publish")
id("pl.allegro.tech.build.axion-release") version "1.18.16" // https://plugins.gradle.org/plugin/pl.allegro.tech.build.axion-release
}
project.version = scmVersion.version
allprojects {
tasks.jar {
onlyIf { sourceSets.main.get().allSource.files.isNotEmpty() }
}
}
val creekVersion = "0.4.2-SNAPSHOT"
val spotBugsVersion = "4.8.6" // https://mvnrepository.com/artifact/com.github.spotbugs/spotbugs-annotations
val guavaVersion = "33.3.1-jre" // https://mvnrepository.com/artifact/com.google.guava/guava
val log4jVersion = "2.24.2" // https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
val junitVersion = "5.11.3" // https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
val junitPioneerVersion = "2.3.0" // https://mvnrepository.com/artifact/org.junit-pioneer/junit-pioneer
val mockitoVersion = "5.14.2" // https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter
dependencies {
implementation("com.github.spotbugs:spotbugs-annotations:$spotBugsVersion")
// Avoid non-test dependencies in plugins.
testImplementation("org.creekservice:creek-test-hamcrest:$creekVersion")
testImplementation("org.creekservice:creek-test-util:$creekVersion")
testImplementation("org.creekservice:creek-test-conformity:$creekVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
testImplementation("org.junit-pioneer:junit-pioneer:$junitPioneerVersion")
testImplementation("org.mockito:mockito-junit-jupiter:$mockitoVersion")
testImplementation("com.google.guava:guava-testlib:$guavaVersion")
testRuntimeOnly("org.apache.logging.log4j:log4j-slf4j2-impl:$log4jVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
// The following dependency is only added to force GitHub Dependency Bot to take the executor version into account
testRuntimeOnly("org.creekservice:creek-system-test-executor:$creekVersion")
}
gradlePlugin {
plugins {
register("CreekPlugin") {
id = "org.creekservice.system.test"
implementationClass = "org.creekservice.api.system.test.gradle.plugin.SystemTestPlugin"
displayName = "Creek system test plugin"
description = "Executes blackbox testing of services running in Docker containers"
tags.set(listOf("creek", "creekservice", "microservice", "docker", "containers", "blackbox", "testing", "test", "integration-test", "test automation"))
}
}
}
tasks.register("writeVersionFile") {
val outputDir = file("$buildDir/generated/resources/version")
val versionFile = file("$outputDir/creek-system-test-executor.version")
sourceSets.main.get().output.dir(mapOf("buildBy" to "writeVersionFile"), outputDir)
inputs.property("executorVersion", creekVersion)
outputs.dir(outputDir).withPropertyName("outputDir")
doLast {
outputDir.mkdirs()
logger.info("Writing creek-system-test-executor version: $creekVersion to $versionFile")
versionFile.writeText(creekVersion)
}
}
tasks.processResources {dependsOn(":writeVersionFile")}
defaultTasks("format", "static", "check")