ummm yeah
This commit is contained in:
53
build.gradle
Normal file
53
build.gradle
Normal file
@ -0,0 +1,53 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'eclipse'
|
||||
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.8'
|
||||
}
|
||||
|
||||
group = 'com.pobnellion'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "papermc-repo"
|
||||
url = "https://repo.papermc.io/repository/maven-public/"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/groups/public/"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
|
||||
annotationProcessor("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
|
||||
}
|
||||
|
||||
def targetJavaVersion = 17
|
||||
java {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
options.release.set(targetJavaVersion)
|
||||
}
|
||||
|
||||
def templateSource = file('src/main/templates')
|
||||
def templateDest = layout.buildDirectory.dir('generated/sources/templates')
|
||||
def generateTemplates = tasks.register('generateTemplates', Copy) { task ->
|
||||
def props = [
|
||||
'version': project.version
|
||||
]
|
||||
task.inputs.properties props
|
||||
|
||||
task.from templateSource
|
||||
task.into templateDest
|
||||
task.expand props
|
||||
}
|
||||
|
||||
sourceSets.main.java.srcDir(generateTemplates.map { it.outputs })
|
||||
|
||||
project.idea.project.settings.taskTriggers.afterSync generateTemplates
|
||||
project.eclipse.synchronizationTasks(generateTemplates)
|
||||
Reference in New Issue
Block a user