blob: d0a7effa5470bcfd555471f2abfaed1ba5b45c1c (
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
|
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")
}
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")
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)
}
|