mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-19 15:09:18 +00:00
use flat maven repository for classpath context
This commit is contained in:
@@ -111,8 +111,10 @@ open class IrisSimpleExecutionEnvironment(
|
|||||||
private val File.escapedPath
|
private val File.escapedPath
|
||||||
get() = absolutePath.replace("\\", "\\\\").replace("\"", "\\\"")
|
get() = absolutePath.replace("\\", "\\\\").replace("\"", "\\\"")
|
||||||
|
|
||||||
|
private const val ARTIFACT_ID = $$"local:${it.relativeTo(home).path.substringBeforeLast(\".jar\")}:1.0.0"
|
||||||
private val BASE_GRADLE = """
|
private val BASE_GRADLE = """
|
||||||
val classpath = files()
|
val classpath = files()
|
||||||
|
val home = file(System.getProperty("user.home"))
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version("2.2.0")
|
kotlin("jvm") version("2.2.0")
|
||||||
@@ -120,6 +122,9 @@ open class IrisSimpleExecutionEnvironment(
|
|||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
flatDir {
|
||||||
|
dirs(home)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val script by configurations.creating
|
val script by configurations.creating
|
||||||
@@ -130,7 +135,7 @@ open class IrisSimpleExecutionEnvironment(
|
|||||||
configurations.kotlinCompilerPluginClasspath { extendsFrom(script) }
|
configurations.kotlinCompilerPluginClasspath { extendsFrom(script) }
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
script(classpath)
|
classpath.forEach { script("$ARTIFACT_ID") }
|
||||||
}""".trimIndent().split("\n")
|
}""".trimIndent().split("\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user