-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle.kts
80 lines (70 loc) · 1.71 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
plugins {
id("org.ajoberstar.defaults.gradle-plugin")
id("groovy")
id("org.ajoberstar.stutter")
}
group = "org.ajoberstar.git-publish"
description = "Gradle plugin for publishing to Git repositories"
mavenCentral {
developerName.set("Andrew Oberstar")
developerEmail.set("ajoberstar@gmail.com")
githubOwner.set("ajoberstar")
githubRepository.set("gradle-git-publish")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
dependencies {
compatTestImplementation(gradleTestKit())
compatTestImplementation("org.spockframework:spock-core:2.3-groovy-3.0")
compatTestImplementation("org.ajoberstar.grgit:grgit-core:[5.0,6.0[")
}
tasks.named<Jar>("jar") {
manifest {
attributes.put("Automatic-Module-Name", "org.ajoberstar.git.publish.gradle")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
stutter {
val java11 by matrices.creating {
javaToolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
gradleVersions {
compatibleRange("7.0")
}
}
val java17 by matrices.creating {
javaToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
gradleVersions {
compatibleRange("7.3")
}
}
val java21 by matrices.creating {
javaToolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
gradleVersions {
compatibleRange("8.4")
}
}
}
tasks.named("check") {
dependsOn(tasks.named("compatTest"))
}
gradlePlugin {
plugins {
create("plugin") {
id = "org.ajoberstar.git-publish"
displayName = "Git Publish Plugin"
description = "Gradle plugin for publishing to Git repositories"
implementationClass = "org.ajoberstar.gradle.git.publish.GitPublishPlugin"
}
}
}