Skip to content

Commit

Permalink
添加构建收集
Browse files Browse the repository at this point in the history
  • Loading branch information
Taskeren committed Feb 11, 2023
1 parent a249907 commit 7443a86
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 deletions.
27 changes: 27 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -67,4 +70,28 @@ allprojects {
tasks.withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}

tasks.build {
dependsOn(tasks["gatherArtifact"])
}

val gitVersion: groovy.lang.Closure<String> 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)
}
}
}
2 changes: 2 additions & 0 deletions devtools/dynamite-cli/src/test/kotlin/TestGraphqlRequests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
12 changes: 0 additions & 12 deletions labyrinth-mongodb/src/test/kotlin/TestGetAssessmentRecords.kt

This file was deleted.

2 changes: 2 additions & 0 deletions src/test/kotlin/TestLabyrinth.kt
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 7443a86

Please sign in to comment.