@@ -15,8 +15,15 @@ plugins {
1515
1616private val VERSION = " 1.2.4"
1717private val RUN_NUMBER = System .getenv(" GITHUB_RUN_NUMBER" ) ? : " DEV"
18+ private val BUNDLE_KOTLIN_STD = if (System .getenv(" BUNDLE_KOTLIN_STD" ) == null ) {
19+ true
20+ } else {
21+ System .getenv(" BUNDLE_KOTLIN_STD" ).toBoolean()
22+ }
23+
24+ println (BUNDLE_KOTLIN_STD )
1825group = " dev.echonine.kite"
19- version = " $VERSION +$RUN_NUMBER "
26+ version = " $VERSION +$RUN_NUMBER " + if ( ! BUNDLE_KOTLIN_STD ) " -NoSTD " else " "
2027
2128repositories {
2229 mavenCentral()
@@ -26,7 +33,11 @@ repositories {
2633
2734dependencies {
2835 // Kotlin Standard Library
29- paperLibrary(kotlin(" stdlib" ))
36+ if (BUNDLE_KOTLIN_STD ) {
37+ paperLibrary(kotlin(" stdlib" ))
38+ } else {
39+ compileOnly(kotlin(" stdlib" ))
40+ }
3041 // Runtime Dependencies
3142 paperLibrary(" io.github.revxrsal:zapper.api:1.0.3" )
3243 paperLibrary(" dev.faststats.metrics:bukkit:0.16.0" )
@@ -51,6 +62,13 @@ paper {
5162 description = " A lightweight Kotlin scripting plugin"
5263 website = " https://echonine.dev/kite/"
5364 authors = listOf (" Saturn745" , " Grabsky" )
65+ if (! BUNDLE_KOTLIN_STD ) {
66+ serverDependencies {
67+ register(" MCKotlin-Paper" ) {
68+ required = true
69+ }
70+ }
71+ }
5472}
5573
5674runPaper.folia.registerTask()
0 commit comments