first commit

This commit is contained in:
2024-01-07 22:04:05 +03:00
commit bf86e9e942
31 changed files with 603 additions and 0 deletions

72
build.gradle Normal file
View File

@@ -0,0 +1,72 @@
plugins {
id 'java'
}
group = 'org.andrewkydev'
version = '1.0'
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 {
implementation 'org.projectlombok:lombok:1.18.28'
implementation 'org.projectlombok:lombok:1.18.28'
compileOnly "io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT"
annotationProcessor 'org.projectlombok:lombok:1.18.24' // Lombok процессор
implementation "org.hibernate.orm:hibernate-core:6.4.0.Final"
}
def targetJavaVersion = 17
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
task copyToPath(){
doLast {
copy {
from "build/libs/API-1.0.jar"
into ".."
}
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
tasks.build.finalizedBy('copyToPath')