blob: 4ea04aa00b2606c76d9b5d1b8f9640695c6935b2 (
plain)
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
|
plugins {
`java-gradle-plugin`
kotlin("jvm") version "1.8.0"
kotlin("plugin.serialization") version "1.8.0"
}
repositories {
mavenCentral()
maven("https://maven.neoforged.net/releases")
maven("https://maven.fabricmc.net")
}
dependencies {
implementation("net.neoforged:artifactural:3.0.17")
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
implementation("net.fabricmc:mapping-io:0.1.8")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
}
gradlePlugin {
val greeting by plugins.creating {
id = "moe.nea.archenemy.greeting"
implementationClass = "moe.nea.archenemy.ArchenemyGreetingPlugin"
}
val mojang by plugins.creating {
id = "moe.nea.archenemy.mojang"
implementationClass = "moe.nea.archenemy.mojang.ArchenemyMojangPlugin"
}
}
// Add a source set for the functional test suite
val functionalTestSourceSet = sourceSets.create("functionalTest") {
}
configurations["functionalTestImplementation"].extendsFrom(configurations["testImplementation"])
// Add a task to run the functional tests
val functionalTest by tasks.registering(Test::class) {
testClassesDirs = functionalTestSourceSet.output.classesDirs
classpath = functionalTestSourceSet.runtimeClasspath
}
gradlePlugin.testSourceSets(functionalTestSourceSet)
tasks.named<Task>("check") {
// Run the functional tests as part of `check`
dependsOn(functionalTest)
}
|