11// file:noinspection UnnecessaryQualifiedReference
22// file:noinspection GroovyAssignabilityCheck
33
4+
45plugins {
56 id " dev.architectury.architectury-pack200" version " 0.1.3"
6- id " gg.essential.loom" version " 0.10.0.4"
7+ id ' org.jetbrains.kotlin.jvm' version ' 1.6.10'
8+ id " cc.polyfrost.loom" version " 0.10.0.5"
79 id " net.kyori.blossom" version " 1.3.0"
810 id " java"
9- id ' maven-publish '
11+ id ' org.jetbrains.kotlin.plugin.serialization ' version ' 1.6.10 '
1012}
1113
1214version = mod_version
@@ -55,6 +57,19 @@ repositories {
5557 mavenCentral()
5658 maven { url ' https://repo.polyfrost.cc/releases' }
5759 maven { url ' https://jitpack.io' }
60+ maven { url ' https://repo.essential.gg/repository/maven-public' }
61+ }
62+
63+ static String ktor (String module , String version , boolean addSuffix ) {
64+ return " io.ktor:ktor-" + module + (addSuffix ? " -jvm" : " " ) + (version != null ? " :" + version : " " );
65+ }
66+
67+ static String ktorClient (String module , String version ) {
68+ return ktor(" client-" + module, version, true );
69+ }
70+
71+ static String ktorServer (String module , String version ) {
72+ return ktor(" server-" + module, version, true );
5873}
5974
6075dependencies {
@@ -67,16 +82,39 @@ dependencies {
6782 include(" org.java-websocket:Java-WebSocket:1.5.3" )
6883 include(' org.reflections:reflections:0.10.2' )
6984 include(" org.json:json:20220924" )
70- include (' org.slick2d:slick2d-core:1.0.2' ) {
85+ include(' org.slick2d:slick2d-core:1.0.2' ) {
7186 exclude module : ' lwjgl'
7287 }
7388 include(' com.github.JnCrMx:discord-game-sdk4j:v0.5.5' )
89+ include(" gg.essential:elementa-1.8.9-forge:590" )
7490
7591 compileOnly(' org.spongepowered:mixin:0.7.11-SNAPSHOT' )
7692
7793
7894 compileOnly(files(' libs/Hytils-Reborn-1.6.0-beta4.jar' ))
7995 compileOnly(" me.djtheredstoner:DevAuth-forge-legacy:1.1.0" )
96+
97+ include(platform(ktor(" bom" , " 2.2.4" , false )))
98+
99+ include(ktor(" serialization-kotlinx-json" , null , true ))
100+ include(ktor(" serialization-gson" , null , true ))
101+
102+ include(ktorClient(" core" , null ))
103+ include(ktorClient(" cio" , null ))
104+ include(ktorClient(" content-negotiation" , null ))
105+ include(ktorClient(" encoding" , null ))
106+
107+ include(ktorServer(" core" , null ))
108+ include(ktorServer(" cio" , null ))
109+ include(ktorServer(" content-negotiation" , null ))
110+ include(ktorServer(" compression" , null ))
111+ include(ktorServer(" cors" , null ))
112+ include(ktorServer(" conditional-headers" , null ))
113+ include(ktorServer(" auto-head-response" , null ))
114+ include(ktorServer(" default-headers" , null ))
115+ include(ktorServer(" host-common" , null ))
116+ include(ktorServer(" auth" , null ))
117+
80118}
81119
82120processResources {
@@ -121,7 +159,7 @@ jar {
121159 ' ModSide' : ' CLIENT' ,
122160 ' ForceLoadAsMod' : true ,
123161 ' FMLAT' : " hysentials_at.cfg" ,
124- ' MixinConfigs' : [" mixins.hysentials.json" , " mixins.hytils.json " ],
162+ ' MixinConfigs' : [" mixins.hysentials.json" ],
125163 " TweakOrder" : " 0" ,
126164 ' TweakClass' : " cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker"
127165 )
@@ -131,3 +169,10 @@ jar {
131169remapJar {
132170 destinationDirectory = file(" C:\\ Users\\ griff\\ Desktop\\ games\\ MultiMC\\ instances\\ 1.8.9\\ .minecraft\\ mods" )
133171}
172+
173+ compileKotlin {
174+ kotlinOptions {
175+ jvmTarget = " 1.8"
176+ freeCompilerArgs = [' -Xjvm-default=compatibility' ]
177+ }
178+ }
0 commit comments