mirror of
				https://github.com/GayPizzaSpecifications/foundation.git
				synced 2025-11-04 11:39:39 +00:00 
			
		
		
		
	Opt-into ExperimentalSerializationApi.
This commit is contained in:
		@ -1,5 +1,6 @@
 | 
				
			|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
 | 
					import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
 | 
				
			||||||
import org.jetbrains.kotlin.com.google.gson.Gson
 | 
					import org.jetbrains.kotlin.com.google.gson.Gson
 | 
				
			||||||
 | 
					import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 | 
				
			||||||
import java.io.FileWriter
 | 
					import java.io.FileWriter
 | 
				
			||||||
 | 
					
 | 
				
			||||||
plugins {
 | 
					plugins {
 | 
				
			||||||
@ -99,6 +100,13 @@ subprojects {
 | 
				
			|||||||
    targetCompatibility = javaVersion
 | 
					    targetCompatibility = javaVersion
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  tasks.withType<KotlinCompile> {
 | 
				
			||||||
 | 
					    kotlinOptions {
 | 
				
			||||||
 | 
					      freeCompilerArgs =
 | 
				
			||||||
 | 
					        freeCompilerArgs + "-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  tasks.processResources {
 | 
					  tasks.processResources {
 | 
				
			||||||
    val props = mapOf("version" to version)
 | 
					    val props = mapOf("version" to version)
 | 
				
			||||||
    inputs.properties(props)
 | 
					    inputs.properties(props)
 | 
				
			||||||
 | 
				
			|||||||
@ -5,7 +5,6 @@ import cloud.kubelet.foundation.core.devupdate.DevUpdateServer
 | 
				
			|||||||
import cloud.kubelet.foundation.core.persist.PersistentStore
 | 
					import cloud.kubelet.foundation.core.persist.PersistentStore
 | 
				
			||||||
import cloud.kubelet.foundation.core.persist.setAllProperties
 | 
					import cloud.kubelet.foundation.core.persist.setAllProperties
 | 
				
			||||||
import io.papermc.paper.event.player.AsyncChatEvent
 | 
					import io.papermc.paper.event.player.AsyncChatEvent
 | 
				
			||||||
import kotlinx.serialization.ExperimentalSerializationApi
 | 
					 | 
				
			||||||
import net.kyori.adventure.text.Component
 | 
					import net.kyori.adventure.text.Component
 | 
				
			||||||
import net.kyori.adventure.text.TextComponent
 | 
					import net.kyori.adventure.text.TextComponent
 | 
				
			||||||
import org.bukkit.GameMode
 | 
					import org.bukkit.GameMode
 | 
				
			||||||
@ -18,7 +17,6 @@ import java.nio.file.Path
 | 
				
			|||||||
import java.time.Instant
 | 
					import java.time.Instant
 | 
				
			||||||
import java.util.concurrent.ConcurrentHashMap
 | 
					import java.util.concurrent.ConcurrentHashMap
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ExperimentalSerializationApi
 | 
					 | 
				
			||||||
class FoundationCorePlugin : JavaPlugin(), Listener {
 | 
					class FoundationCorePlugin : JavaPlugin(), Listener {
 | 
				
			||||||
  internal val persistentStores = ConcurrentHashMap<String, PersistentStore>()
 | 
					  internal val persistentStores = ConcurrentHashMap<String, PersistentStore>()
 | 
				
			||||||
  private lateinit var _pluginDataPath: Path
 | 
					  private lateinit var _pluginDataPath: Path
 | 
				
			||||||
 | 
				
			|||||||
@ -5,14 +5,12 @@ import cloud.kubelet.foundation.core.Util
 | 
				
			|||||||
import com.charleskorn.kaml.Yaml
 | 
					import com.charleskorn.kaml.Yaml
 | 
				
			||||||
import com.sun.net.httpserver.HttpExchange
 | 
					import com.sun.net.httpserver.HttpExchange
 | 
				
			||||||
import com.sun.net.httpserver.HttpServer
 | 
					import com.sun.net.httpserver.HttpServer
 | 
				
			||||||
import kotlinx.serialization.ExperimentalSerializationApi
 | 
					 | 
				
			||||||
import kotlinx.serialization.json.Json
 | 
					import kotlinx.serialization.json.Json
 | 
				
			||||||
import kotlinx.serialization.json.decodeFromStream
 | 
					import kotlinx.serialization.json.decodeFromStream
 | 
				
			||||||
import kotlinx.serialization.json.jsonPrimitive
 | 
					import kotlinx.serialization.json.jsonPrimitive
 | 
				
			||||||
import java.net.InetSocketAddress
 | 
					import java.net.InetSocketAddress
 | 
				
			||||||
import kotlin.io.path.inputStream
 | 
					import kotlin.io.path.inputStream
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ExperimentalSerializationApi
 | 
					 | 
				
			||||||
class DevUpdateServer(val plugin: FoundationCorePlugin) {
 | 
					class DevUpdateServer(val plugin: FoundationCorePlugin) {
 | 
				
			||||||
  private lateinit var config: DevUpdateConfig
 | 
					  private lateinit var config: DevUpdateConfig
 | 
				
			||||||
  private var server: HttpServer? = null
 | 
					  private var server: HttpServer? = null
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user