-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
103 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
101
102
103
plugins {
`java-gradle-plugin`
alias(libs.plugins.gradleBuildInfo)
alias(libs.plugins.gradlePluginPublish)
alias(libs.plugins.gradleJavaConventions)
}
repositories { mavenCentral() }
group = "com.opencastsoftware.gradle"
description = "A Gradle plugin for generating build info as Java code."
java { toolchain.languageVersion.set(JavaLanguageVersion.of(11)) }
buildInfo {
packageName.set("com.opencastsoftware.gradle.buildinfo")
properties.set(mapOf("javaPoetVersion" to libs.versions.javaPoet.get()))
}
dependencies {
compileOnly(libs.javaPoet)
testImplementation(libs.junitJupiter)
}
gradlePlugin {
website.set("https://github.com/opencastsoftware/gradle-build-info")
vcsUrl.set("https://github.com/opencastsoftware/gradle-build-info.git")
plugins {
create("buildInfoPlugin") {
id = "com.opencastsoftware.gradle.buildinfo"
displayName = "Build Info Plugin"
description = project.description
implementationClass = "com.opencastsoftware.gradle.buildinfo.BuildInfoPlugin"
tags.set(listOf("build", "info", "codegen", "code-generation", "java"))
}
}
}
mavenPublishing {
coordinates("com.opencastsoftware.gradle", "gradle-build-info", project.version.toString())
pom {
name.set("Gradle Build Info Plugin")
description.set(project.description)
url.set("https://github.com/opencastsoftware/gradle-build-info")
inceptionYear.set("2022")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
organization {
name.set("Opencast Software Europe Ltd")
url.set("https://opencastsoftware.com")
}
developers {
developer {
id.set("DavidGregory084")
name.set("David Gregory")
organization.set("Opencast Software Europe Ltd")
organizationUrl.set("https://opencastsoftware.com/")
timezone.set("Europe/London")
url.set("https://github.com/DavidGregory084")
}
}
ciManagement {
system.set("Github Actions")
url.set("https://github.com/opencastsoftware/gradle-build-info/actions")
}
issueManagement {
system.set("GitHub")
url.set("https://github.com/opencastsoftware/gradle-build-info/issues")
}
scm {
connection.set("scm:git:https://github.com/opencastsoftware/gradle-build-info.git")
developerConnection.set("scm:git:[email protected]:opencastsoftware/gradle-build-info.git")
url.set("https://github.com/opencastsoftware/gradle-build-info")
}
}
}
tasks.withType<JavaCompile>() {
// Target Java 8
options.release.set(8)
}
testing {
suites {
val functionalTest by
registering(JvmTestSuite::class) {
gradlePlugin.testSourceSets(sources)
testType.set(TestSuiteType.FUNCTIONAL_TEST)
}
}
}
val functionalTestImplementation: Configuration by
configurations.getting { extendsFrom(configurations.testImplementation.get()) }
tasks.named<Task>("check") { dependsOn(testing.suites.named("functionalTest")) }