diff --git a/build.gradle.kts b/build.gradle.kts index 7aa7c74..dbd655b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,13 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import org.jetbrains.kotlin.incremental.mkdirsOrThrow plugins { java kotlin("jvm") version "1.7.20" application id("com.github.johnrengelman.shadow") version "7.1.2" apply false + + id("com.palantir.git-version") version "1.0.0" } group = "explode" @@ -67,4 +70,28 @@ allprojects { tasks.withType { duplicatesStrategy = DuplicatesStrategy.EXCLUDE } +} + +tasks.build { + dependsOn(tasks["gatherArtifact"]) +} + +val gitVersion: groovy.lang.Closure by extra + +task("gatherArtifact") { + dependsOn(":explode-all:shadowJar", ":explode-proxy:shadowJar") + + doLast { + logger.info("building artifact") + + // ensure that the output dir is present + val outputDir = file("build/gather-builds").apply(File::mkdirsOrThrow) + + val gitVer = runCatching { gitVersion() }.getOrElse { "NO-GIT-TAG" } + + subprojects.forEach { p -> + println("collecting project: $p") + p.buildDir.resolve("libs").copyRecursively(outputDir.resolve(gitVer).resolve(p.name), true) + } + } } \ No newline at end of file diff --git a/devtools/dynamite-cli/src/test/kotlin/TestGraphqlRequests.kt b/devtools/dynamite-cli/src/test/kotlin/TestGraphqlRequests.kt index 5c5c5d5..019be1a 100644 --- a/devtools/dynamite-cli/src/test/kotlin/TestGraphqlRequests.kt +++ b/devtools/dynamite-cli/src/test/kotlin/TestGraphqlRequests.kt @@ -6,8 +6,10 @@ import io.ktor.serialization.gson.* import kotlinx.coroutines.flow.collectIndexed import kotlinx.coroutines.flow.flow import kotlinx.coroutines.runBlocking +import kotlin.test.Ignore import kotlin.test.Test +@Ignore internal class TestGraphqlRequests { private val http = HttpClient(OkHttp) { diff --git a/labyrinth-mongodb/src/test/kotlin/TestGetAssessmentRecords.kt b/labyrinth-mongodb/src/test/kotlin/TestGetAssessmentRecords.kt deleted file mode 100644 index f3c2fa7..0000000 --- a/labyrinth-mongodb/src/test/kotlin/TestGetAssessmentRecords.kt +++ /dev/null @@ -1,12 +0,0 @@ -import explode2.labyrinth.LabyrinthPlugin -import org.junit.jupiter.api.Test - -class TestGetAssessmentRecords { - - @Test - fun testGetAssessmentRecords() { - LabyrinthPlugin.labyrinth.assessmentRecordFactory.getAssessmentRecords("3249a0da-221d-45d7-b9b1-81f3fbbe59b6") - .forEach(::println) - } - -} \ No newline at end of file diff --git a/src/test/kotlin/TestLabyrinth.kt b/src/test/kotlin/TestLabyrinth.kt index 4cdcad7..0b41814 100644 --- a/src/test/kotlin/TestLabyrinth.kt +++ b/src/test/kotlin/TestLabyrinth.kt @@ -1,7 +1,9 @@ import explode2.labyrinth.LabyrinthPlugin import java.util.* +import kotlin.test.Ignore import kotlin.test.Test +@Ignore internal class TestLabyrinth { private val uid = "1c2b86d9-b1f8-423f-9121-84d58dc37ba9"