- 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 = "${BUILD_COORDS.groupId}"
- version = "${BUILD_COORDS.version}"
- repositories {
- mavenCentral()
- maven("https://repo.papermc.io/repository/maven-public/") {
- name = "papermc-repo"
- }
- maven("https://oss.sonatype.org/content/groups/public/") {
- name = "sonatype"
- }
- }
- dependencies {
- compileOnly("com.velocitypowered:velocity-api:${VELOCITY_VERSION}")
- kapt("com.velocitypowered:velocity-api:${VELOCITY_VERSION}")
- implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
- }
- 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(${VELOCITY_VERSION})
- }
- }
- 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)
- 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 = "${BUILD_COORDS.groupId}"
- version = "${BUILD_COORDS.version}"
- repositories {
- mavenCentral()
- maven("https://repo.papermc.io/repository/maven-public/") {
- name = "papermc-repo"
- }
- maven("https://oss.sonatype.org/content/groups/public/") {
- name = "sonatype"
- }
- }
- dependencies {
- compileOnly("com.velocitypowered:velocity-api:${VELOCITY_VERSION}")
- kapt("com.velocitypowered:velocity-api:${VELOCITY_VERSION}")
- implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
- }
- 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("${VELOCITY_VERSION}")
- }
- }
- 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)