-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle.kts
101 lines (90 loc) · 3.35 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
99
100
plugins {
id("groovy")
id("gradlexbuild.lifecycle")
id("gradlexbuild.jvm-dependency-conflict-detection-documentation")
id("org.gradlex.internal.plugin-publish-conventions") version "0.6"
}
group = "org.gradlex"
version = "2.1.2"
java {
toolchain.languageVersion = JavaLanguageVersion.of(11) // to run tests that use Android with 11
}
tasks.withType<JavaCompile>().configureEach {
options.release = 8
}
tasks.withType<Javadoc>().configureEach {
options {
this as StandardJavadocDocletOptions
encoding = "UTF-8"
addStringOption("Xdoclint:all,-missing", "-quiet")
addStringOption("Xwerror", "-quiet")
}
}
val tagsList = listOf(
"dependency", "dependencies", "dependency-management", "capabilities", "java", "logging",
"asm", "bouncycastle", "cglib", "commons-io", "dom4j", "guava", "hamcrest", "javax", "jakarta", "junit",
"mysql", "postgresql", "stax", "slf4j", "log4j2", "velocity", "woodstox"
)
pluginPublishConventions {
id("org.gradlex.jvm-dependency-conflict-resolution")
implementationClass("org.gradlex.jvm.dependency.conflict.resolution.JvmDependencyConflictResolutionPlugin")
displayName("JVM Conflict Resolution Gradle Plugin")
description("Convenient dependency conflict management for Java projects.")
tags(*tagsList.toTypedArray())
gitHub("https://github.com/gradlex-org/jvm-dependency-conflict-resolution")
website("https://github.com/gradlex-org/jvm-dependency-conflict-resolution")
developer {
id = "britter"
name = "Benedikt Ritter"
email = "[email protected]"
}
developer {
id = "jjohannes"
name = "Jendrik Johannes"
email = "[email protected]"
}
developer {
id = "ljacomet"
name = "Louis Jacomet"
email = "[email protected]"
}
}
gradlePlugin {
plugins {
create("jvm-dependency-conflict-detection") {
id = "org.gradlex.jvm-dependency-conflict-detection"
implementationClass = "org.gradlex.jvm.dependency.conflict.detection.JvmDependencyConflictDetectionPlugin"
displayName = "JVM Conflict Detection Gradle Plugin"
description = "Adds Capabilities to well-known Components hosted on Maven Central."
tags = tagsList
}
}
}
dependencies {
testImplementation("org.gradle.exemplar:samples-check:1.0.2")
testImplementation("org.spockframework:spock-core:2.3-groovy-3.0")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}
testing.suites.named<JvmTestSuite>("test") {
useJUnitJupiter()
listOf("6.8.3", "6.9.4", "7.0.2", "7.6.4", "8.0.2").forEach { gradleVersionUnderTest ->
targets.register("test${gradleVersionUnderTest}") {
testTask {
group = LifecycleBasePlugin.VERIFICATION_GROUP
description = "Runs tests against Gradle $gradleVersionUnderTest"
useJUnitPlatform {
excludeTags("no-cross-version")
}
systemProperty("gradleVersionUnderTest", gradleVersionUnderTest)
exclude("**/*SamplesTest.class") // Not yet cross-version ready
}
}
}
targets.all {
testTask {
maxParallelForks = 4
inputs.dir(layout.projectDirectory.dir("samples"))
inputs.dir("src/docs/samples")
}
}
}