-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
68 lines (58 loc) · 1.98 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
plugins {
id("java-gradle-plugin")
id("maven-publish")
id("com.gradle.plugin-publish") version "1.1.0"
alias(libs.plugins.kotlin.serialization)
}
description = "License Gradle Plugin"
group = "io.cloudflight.license.gradle"
autoConfigure {
java {
languageVersion.set(JavaLanguageVersion.of(11))
vendorName.set("Cloudflight")
}
}
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
implementation(libs.maven.artifact)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.html.jvm)
implementation(libs.spdx.catalog)
implementation(libs.json.wrapper)
implementation(libs.httpclient)
implementation(libs.snakeyaml)
implementation(libs.gradle.node.plugin)
testImplementation(libs.bundles.testImplementationDependencies)
testRuntimeOnly(libs.junit.engine)
}
tasks.compileKotlin.configure {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
}
}
gradlePlugin {
website.set("https://github.com/cloudflightio/license-gradle-plugin")
vcsUrl.set("https://github.com/cloudflightio/license-gradle-plugin.git")
plugins {
create("license-gradle-plugin") {
id = "io.cloudflight.license-gradle-plugin"
displayName = "License Gradle Plugin"
description = "Collects and prints all dependencies along with their licenses including SPDX support"
implementationClass = "io.cloudflight.license.gradle.LicensePlugin"
tags.set(listOf("license", "dependencies", "report"))
}
}
}
tasks.withType<Jar>() {
from(layout.projectDirectory.file("LICENSE"))
from(layout.projectDirectory.file("NOTICE"))
}
tasks.withType<Test> {
// we wanna set the java Launcher to 17 here in order to be able set higher java compatibility
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(17))
})
}