Skip to content

Commit

Permalink
illegal auto-version-getting in tests
Browse files Browse the repository at this point in the history
very silly
  • Loading branch information
rhysdh540 committed Aug 3, 2024
1 parent f847251 commit 001a0f4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions expect-platform-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import xyz.wagyourtail.unimined.expect.task.ExpectPlatformFiles
import xyz.wagyourtail.unimined.expect.task.ExpectPlatformJar
import xyz.wagyourtail.unimined.expect.expectPlatform
import java.util.Properties

val epVersion: String = file("../gradle.properties").let { Properties().apply { load(it.reader()) } }.getProperty("version")
val epVersion = projectDir.parentFile.resolve("gradle.properties").readText()
.split("\n").find { it.startsWith("version") }!!
.split("=").last().trimStart()

buildscript {
repositories {
Expand All @@ -15,7 +16,10 @@ buildscript {
}
dependencies {
if (!project.hasProperty("runningTest")) {
classpath("xyz.wagyourtail.unimined.expect-platform:expect-platform:1.1.0")
val epVersion = projectDir.parentFile.resolve("gradle.properties").readText()
.split("\n").find { it.startsWith("version") }!!
.split("=").last().trimStart()
classpath("xyz.wagyourtail.unimined.expect-platform:expect-platform:${epVersion}")
classpath("org.ow2.asm:asm:9.7")
classpath("org.ow2.asm:asm-commons:9.7")
classpath("org.ow2.asm:asm-tree:9.7")
Expand Down

0 comments on commit 001a0f4

Please sign in to comment.