mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-21 03:33:23 +00:00
update maven core to fix dependency resolution issues
This commit is contained in:
parent
8f5f44bc96
commit
3d2392843a
@ -100,7 +100,11 @@ dependencies {
|
||||
slim(libs.kotlin.scripting.common)
|
||||
slim(libs.kotlin.scripting.jvm)
|
||||
slim(libs.kotlin.scripting.jvm.host)
|
||||
slim(libs.kotlin.scripting.dependencies.maven)
|
||||
slim(libs.kotlin.scripting.dependencies.maven) {
|
||||
constraints {
|
||||
slim(libs.mavenCore)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
|
@ -36,8 +36,8 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.*;
|
||||
|
||||
public class MythicMobsLink {
|
||||
|
@ -14,12 +14,10 @@ import net.jpountz.lz4.LZ4BlockInputStream;
|
||||
import net.jpountz.lz4.LZ4BlockOutputStream;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.annotation.concurrent.NotThreadSafe;
|
||||
import java.io.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
@NotThreadSafe
|
||||
@RequiredArgsConstructor
|
||||
class PregenCacheImpl implements PregenCache {
|
||||
private static final int SIZE = 32;
|
||||
|
@ -22,8 +22,7 @@ import com.volmit.iris.engine.object.IrisObject;
|
||||
import com.volmit.iris.engine.object.IrisObjectPlacement;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.volmit.iris.core.scripting.kotlin.base
|
||||
|
||||
import com.volmit.iris.core.scripting.kotlin.runner.configureMavenDepsOnAnnotations
|
||||
import com.volmit.iris.util.misc.SlimJar
|
||||
import kotlin.script.experimental.annotations.KotlinScript
|
||||
import kotlin.script.experimental.api.ScriptCompilationConfiguration
|
||||
import kotlin.script.experimental.api.defaultImports
|
||||
@ -16,8 +15,6 @@ import kotlin.script.experimental.jvm.jvm
|
||||
abstract class SimpleScript
|
||||
|
||||
object SimpleScriptDefinition : ScriptCompilationConfiguration({
|
||||
SlimJar.load(null)
|
||||
|
||||
isStandalone(false)
|
||||
defaultImports(
|
||||
"kotlin.script.experimental.dependencies.DependsOn",
|
||||
|
@ -76,11 +76,9 @@ open class IrisSimpleExecutionEnvironment : ExecutionEnvironment.Simple {
|
||||
|
||||
override fun configureProject(projectDir: File) {
|
||||
projectDir.mkdirs()
|
||||
val libs = javaClass.classLoader.parent.classpath
|
||||
val libs = javaClass.classLoader.classpath
|
||||
.sortedBy { it.absolutePath }
|
||||
.toMutableList()
|
||||
libs.add(codeSource)
|
||||
libs.removeIf { libs.count { f -> f.name == it.name } > 1 }
|
||||
|
||||
File(projectDir, "build.gradle.kts")
|
||||
.updateClasspath(libs)
|
||||
@ -88,7 +86,6 @@ open class IrisSimpleExecutionEnvironment : ExecutionEnvironment.Simple {
|
||||
|
||||
companion object {
|
||||
private const val CLASSPATH = "val classpath = files("
|
||||
private val codeSource = File(IrisSimpleExecutionEnvironment::class.java.protectionDomain.codeSource.location.toURI())
|
||||
|
||||
private fun File.updateClasspath(classpath: List<File>) {
|
||||
val test = if (exists()) readLines() else BASE_GRADLE
|
||||
@ -129,7 +126,7 @@ open class IrisSimpleExecutionEnvironment : ExecutionEnvironment.Simple {
|
||||
configurations.kotlinCompilerPluginClasspath { extendsFrom(script) }
|
||||
|
||||
dependencies {
|
||||
add("script", classpath)
|
||||
script(classpath)
|
||||
}""".trimIndent().split("\n")
|
||||
}
|
||||
}
|
@ -40,6 +40,7 @@ jaxen = "2.0.0" # https://central.sonatype.com/artifact/jaxen/jaxen
|
||||
# Script Engine
|
||||
kotlin = "2.2.0"
|
||||
kotlin-coroutines = "1.10.2"
|
||||
maven-core = "3.9.10"
|
||||
|
||||
# Third Party Integrations
|
||||
nexo = "1.8.0" # https://repo.nexomc.com/#/releases/com/nexomc/nexo
|
||||
@ -91,8 +92,9 @@ kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.re
|
||||
kotlin-scripting-common = { module = "org.jetbrains.kotlin:kotlin-scripting-common", version.ref = "kotlin" }
|
||||
kotlin-scripting-jvm = { module = "org.jetbrains.kotlin:kotlin-scripting-jvm", version.ref = "kotlin" }
|
||||
kotlin-scripting-jvm-host = { module = "org.jetbrains.kotlin:kotlin-scripting-jvm-host", version.ref = "kotlin" }
|
||||
kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines"}
|
||||
kotlin-scripting-dependencies-maven = { module = "org.jetbrains.kotlin:kotlin-scripting-dependencies-maven", version.ref = "kotlin"}
|
||||
kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlin-coroutines" }
|
||||
kotlin-scripting-dependencies-maven = { module = "org.jetbrains.kotlin:kotlin-scripting-dependencies-maven", version.ref = "kotlin" }
|
||||
mavenCore = { module = "org.apache.maven:maven-core", version.ref = "maven-core" }
|
||||
|
||||
# Third Party Integrations
|
||||
nexo = { module = "com.nexomc:nexo", version.ref = "nexo" }
|
||||
|
Loading…
x
Reference in New Issue
Block a user