init
This commit is contained in:
commit
f8e79ea869
13 changed files with 1335 additions and 0 deletions
72
build.gradle.kts
Normal file
72
build.gradle.kts
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
plugins {
|
||||
id("java")
|
||||
id("java-library")
|
||||
id("maven-publish")
|
||||
}
|
||||
|
||||
group = "ru.d3st0ny"
|
||||
version = "0.1"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = uri("https://libraries.minecraft.net") }
|
||||
maven { url = uri("https://papermc.io/repo/repository/maven-public/") }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api("com.mojang:brigadier:1.0.18") {
|
||||
exclude("com.google.guava", "guava")
|
||||
}
|
||||
compileOnly("io.papermc.paper:paper-api:1.19-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven"){
|
||||
artifactId = project.name.toLowerCase()
|
||||
groupId = "${project.group}"
|
||||
version = "${project.version}"
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://gitea.destony.dev/api/packages/Polygon/maven")
|
||||
name = "gitea"
|
||||
credentials {
|
||||
username = System.getenv("gitUsername")
|
||||
password = System.getenv("gitPassword")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val javaVersion = 17
|
||||
|
||||
tasks {
|
||||
|
||||
// USE THIS TASK FOR BUILD & PUBLISH TO MAVEN REPO
|
||||
publish {
|
||||
dependsOn(assemble)
|
||||
}
|
||||
|
||||
// USE THIS TASK FOR BUILD
|
||||
assemble {}
|
||||
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(javaVersion)
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
processResources {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(javaVersion))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue