Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
enwulf committed Jun 2, 2024
0 parents commit 2eb36c2
Show file tree
Hide file tree
Showing 25 changed files with 1,063 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 81 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import org.apache.tools.ant.filters.ReplaceTokens
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.9.23"
id("com.github.johnrengelman.shadow") version "8.1.1"
}

group = "ru.enwulf"
version = "1.0"

repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}

dependencies {
implementation(kotlin("stdlib"))
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
}

tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
}

withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}


processResources {
filteringCharset = "UTF-8"
filesMatching("**/plugin.yml") {
filter<ReplaceTokens>(
"tokens" to mapOf(
"name" to project.name,
"version" to project.version,
)
)
}
}


shadowJar {
archiveFileName.set("${project.name}-${project.version}.jar")

val libs = "libs"
relocate("org.jetbrains", "$libs.jetbrains")
relocate("kotlin", "$libs.kotlin")

dependencies {
exclude("META-INF/**")
}

minimize()
}

build {
dependsOn(shadowJar)
}
}



/*
tasks.register<Copy>("moveToPluginsDir") {
from(tasks.shadowJar.get().archiveFile.get().asFile)
//from("C:/Users/raizz/Desktop/DamagerENW/build/libs/DamagerENW-1.0.jar")
val userName = System.getProperty("user.name")
val pluginsDir = file("C:/Users/$userName/Desktop/server1.20.4/plugins")
pluginsDir.mkdirs()
into(pluginsDir)
}
tasks.named("build") { finalizedBy("moveToPluginsDir") }
*/
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
kotlin.code.style=official
org.gradle.jvmargs=-Xms1024m -Xmx4096m
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Thu Apr 25 17:21:55 MSK 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 2eb36c2

Please sign in to comment.