-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
62 lines (52 loc) · 2.01 KB
/
build.gradle.kts
File metadata and controls
62 lines (52 loc) · 2.01 KB
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
import org.jetbrains.gradle.ext.settings
import org.jetbrains.gradle.ext.taskTriggers
plugins {
kotlin("jvm") version "2.0.20-Beta1"
kotlin("kapt") version "2.0.20-Beta1"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("eclipse")
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.8"
id("xyz.jpenilla.run-velocity") version "2.3.1"
}
group = "com.LZAlien"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/") {
name = "papermc-repo"
}
}
dependencies {
compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
// // Source: https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client
// implementation("org.mariadb.jdbc:mariadb-java-client:3.5.6")
// Source: https://mvnrepository.com/artifact/com.github.kittinunf.fuel/fuel
implementation("com.github.kittinunf.fuel:fuel:2.3.1")
kapt("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
}
tasks {
runVelocity {
// Configure the Velocity version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
velocityVersion("3.3.0-SNAPSHOT")
}
}
val targetJavaVersion = 17
kotlin {
jvmToolchain(targetJavaVersion)
}
val templateSource = file("src/main/templates")
val templateDest = layout.buildDirectory.dir("generated/sources/templates")
val generateTemplates = tasks.register<Copy>("generateTemplates") {
val props = mapOf("version" to project.version)
inputs.properties(props)
from(templateSource)
into(templateDest)
expand(props)
}
sourceSets.main.configure { java.srcDir(generateTemplates.map { it.outputs }) }
project.idea.project.settings.taskTriggers.afterSync(generateTemplates)
project.eclipse.synchronizationTasks(generateTemplates)