-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
93 lines (79 loc) · 2.53 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
plugins {
id("com.gradle.plugin-publish") version "0.20.0"
`java-gradle-plugin`
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
kotlin("jvm") version "1.6.10"
kotlin("plugin.serialization") version "1.6.10"
}
version = "1.1.2"
repositories {
mavenCentral()
}
val integrationTest: SourceSet by sourceSets.creating {
compileClasspath += sourceSets.main.get().output
runtimeClasspath += sourceSets.main.get().output
}
val integrationTestImplementation: Configuration by configurations.getting {
extendsFrom(configurations.implementation.get())
}
dependencies {
implementation("com.charleskorn.kaml", "kaml", "0.40.0")
implementation("org.jetbrains.kotlinx", "kotlinx-serialization-core", "1.3.2")
integrationTestImplementation(kotlin("test-junit5"))
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
vendor.set(JvmVendorSpec.ADOPTOPENJDK)
}
}
gradlePlugin {
plugins {
create("gradle-spigot-dependency-loader") {
id = "de.nycode.spigot-dependency-loader"
implementationClass = "de.nycode.gradle.spigot_dependency_loader.GradleSpigotDependencyLoaderPlugin"
}
}
testSourceSets(integrationTest)
}
val integrationTestTask = task<Test>("integrationTest") {
description = "Runs integration tests."
group = "verification"
testClassesDirs = integrationTest.output.classesDirs
classpath = integrationTest.runtimeClasspath
shouldRunAfter("test")
}
tasks {
check {
dependsOn(integrationTestTask)
}
withType<Test> {
useJUnitPlatform()
}
}
pluginBundle {
website = "https://github.com/NyCodeGHG/gradle-spigot-dependency-loader"
vcsUrl = "https://github.com/NyCodeGHG/gradle-spigot-dependency-loader"
description = "Automatically download your dependencies at runtime on Spigot 1.16.5+"
(plugins) {
"gradle-spigot-dependency-loader" {
displayName = "Spigot Dependency Loader"
description = this@pluginBundle.description
tags = listOf("spigot", "dependency-management", "runtime-dependency-management")
version = project.version.toString()
}
}
mavenCoordinates {
groupId = "de.nycode"
artifactId = "spigot-dependency-loader"
version = project.version.toString()
}
}
tasks {
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
}
}
}