Skip to content

Commit

Permalink
[CI skip] refactor: kotlin (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 authored Apr 11, 2024
1 parent 4236e52 commit 329ada1
Show file tree
Hide file tree
Showing 82 changed files with 2,181 additions and 2,441 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI
name: CI

on:
push:
Expand Down
58 changes: 0 additions & 58 deletions build.gradle

This file was deleted.

59 changes: 59 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
plugins {
kotlin("jvm") version "1.9.23"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
}

group = "net.guizhanss"
version = "UNOFFICIAL"
description = "UltimateGenerators2"

repositories {
mavenLocal()
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://jitpack.io")
}

val spigotVersion = "1.20.4-R0.1-SNAPSHOT"
val slimefunVersion = "RC-37"
val slimefunTranslationVersion = "e03b01a7b7"
val guizhanLibVersion = "1.7.6"
val bstatsVersion = "3.0.2"

dependencies {
compileOnly("org.spigotmc:spigot-api:${spigotVersion}")
compileOnly("com.github.Slimefun:Slimefun4:${slimefunVersion}")
compileOnly("net.guizhanss:SlimefunTranslation:${slimefunTranslationVersion}")
implementation("net.guizhanss:GuizhanLib-api:${guizhanLibVersion}")
implementation("org.bstats:bstats-bukkit:${bstatsVersion}")
}

kotlin {
jvmToolchain(17)
}

tasks.compileKotlin {
kotlinOptions.javaParameters = true
}

tasks.shadowJar {
fun doRelocate(from: String) {
val last = from.split(".").last()
relocate(from, "net.guizhanss.ultimategenerators2.libs.$last")
}
doRelocate("net.guizhanss.guizhanlib")
doRelocate("org.bstats")
minimize()
archiveClassifier = ""
}

bukkit {
main = "net.guizhanss.ultimategenerators2.UltimateGenerators2"
apiVersion = "1.16"
authors = listOf("ybw0014")
description = "A Slimefun Addon that adds various types of generators."
depend = listOf("Slimefun")
softDepend = listOf("GuizhanLibPlugin", "SlimefunTranslation")
}
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "UltimateGenerators2"

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 329ada1

Please sign in to comment.