Skip to content

Commit

Permalink
Move junit libs to managed block.
Browse files Browse the repository at this point in the history
Fixed #831
  • Loading branch information
altro3 committed Jan 27, 2024
1 parent 6403912 commit 5e24562
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 29 deletions.
7 changes: 4 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ managed-mockk = { module = "io.mockk:mockk", version.ref = "managed-mockk" }
managed-kotest-assertions-core-jvm = { module = "io.kotest:kotest-assertions-core-jvm", version.ref = "managed-kotest" }
managed-kotest-runner-junit5-jvm = { module = "io.kotest:kotest-runner-junit5-jvm", version.ref = "managed-kotest" }

managed-junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "managed-junit" }
managed-junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "managed-junit" }
managed-junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "managed-junit" }

# BOMs
boms-junit = { module = "org.junit:junit-bom", version.ref = "managed-junit" }
boms-kotest = { module = "io.kotest:kotest-bom", version.ref = "managed-kotest" }
Expand All @@ -64,9 +68,6 @@ graal-svm = { module = "org.graalvm.nativeimage:svm", version.ref = "graal-svm"

spock-core = { module = "org.spockframework:spock-core" }
jakarta-inject-api = { module = "jakarta.inject:jakarta.inject-api" }
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "managed-junit" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "managed-junit" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "managed-junit" }
rest-assured = { module = "io.rest-assured:rest-assured" }
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
Expand Down
2 changes: 1 addition & 1 deletion test-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {

dependencies {
compileOnly(mn.micronaut.http.server)
compileOnly(libs.junit.jupiter.api)
compileOnly(libs.managed.junit.jupiter.api)
compileOnly(mnData.micronaut.data.connection.jdbc)
compileOnly(mnR2dbc.r2dbc.spi)
compileOnly(mn.reactor)
Expand Down
11 changes: 7 additions & 4 deletions test-junit5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,21 @@ tasks.withType(Jar).configureEach {
}

dependencies {

compileOnly(libs.graal.svm)

api projects.micronautTestCore
api(mn.micronaut.inject)
api(libs.junit.jupiter.api)
api(libs.managed.junit.jupiter.api)

implementation(mn.micronaut.context)
compileOnly(libs.graal.svm)

testCompileOnly(mn.micronaut.inject)

testAnnotationProcessor(mn.micronaut.inject.java)
testAnnotationProcessor(mn.micronaut.graal)

testImplementation(libs.junit.jupiter.params)
testImplementation(libs.managed.junit.jupiter.params)
testImplementation(mn.micronaut.http.server.netty)
testImplementation(mn.micronaut.http.client)
testImplementation(libs.managed.mockito.junit.jupiter)
Expand All @@ -58,7 +61,7 @@ dependencies {
testRuntimeOnly(mnSql.micronaut.jdbc.tomcat)
testRuntimeOnly(mnSql.h2)
testRuntimeOnly(mnSerde.micronaut.serde.jackson)
testRuntimeOnly(libs.junit.jupiter.engine)
testRuntimeOnly(libs.managed.junit.jupiter.engine)
testRuntimeOnly(testFixtures(projects.micronautTestCore))
}

Expand Down
15 changes: 7 additions & 8 deletions test-kotest5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ plugins {
}

dependencies {

compileOnly(libs.jakarta.inject.api)

api projects.micronautTestCore
api(mn.micronaut.context)
api(platform(libs.boms.kotest))
Expand All @@ -15,27 +18,23 @@ dependencies {
implementation(libs.kotlin.stdlib.jdk8)
implementation(libs.kotlin.reflect)

compileOnly(libs.jakarta.inject.api)

testCompileOnly(libs.jakarta.inject.api)

kaptTest(platform(mn.micronaut.core.bom))
kaptTest(mn.micronaut.inject.java)

testImplementation(libs.managed.mockk)
testCompileOnly(libs.jakarta.inject.api)

testImplementation(libs.managed.mockk)
testImplementation(mn.micronaut.http.server.netty)
testImplementation(mn.micronaut.http.client)

testImplementation(mnData.micronaut.data.tx)
testImplementation(mnData.micronaut.data.hibernate.jpa)
testImplementation(mn.snakeyaml)
testImplementation(libs.managed.kotest.assertions.core.jvm)

testRuntimeOnly(mnLogging.logback.classic)
testRuntimeOnly(mnSql.micronaut.jdbc.tomcat)
testRuntimeOnly(mnSql.h2)
testRuntimeOnly(mnSerde.micronaut.serde.jackson)
testImplementation(mn.snakeyaml)
testImplementation(libs.managed.kotest.assertions.core.jvm)
testRuntimeOnly(testFixtures(projects.micronautTestCore))
}

Expand Down
11 changes: 7 additions & 4 deletions test-rest-assured/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@ plugins {

dependencies {
annotationProcessor(mn.micronaut.inject.java)

api projects.micronautTestCore
api(platform(libs.boms.rest.assured))
api(mn.micronaut.inject)
api(libs.rest.assured) {
exclude group:"org.codehaus.groovy", module:"groovy"
}
implementation(mn.micronaut.context)

implementation(libs.groovy)
testCompileOnly(mn.micronaut.inject)

testAnnotationProcessor(mn.micronaut.inject.java)
testImplementation(libs.junit.jupiter.api)

testCompileOnly(mn.micronaut.inject)

testImplementation(libs.managed.junit.jupiter.api)
testImplementation projects.micronautTestJunit5
testImplementation(mn.micronaut.http.server.netty)
testImplementation(libs.managed.hamcrest)
testRuntimeOnly(libs.junit.jupiter.engine)

testRuntimeOnly(libs.managed.junit.jupiter.engine)
testRuntimeOnly(mnSerde.micronaut.serde.jackson)
}
8 changes: 5 additions & 3 deletions test-spock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ plugins {
}

dependencies {

compileOnly(libs.jakarta.inject.api)

api(platform(libs.boms.spock))
api projects.micronautTestCore
api(mn.micronaut.inject)
api(libs.spock.core) {
exclude group: "org.codehaus.groovy", module: "groovy-all"
}

implementation(mn.micronaut.context)
compileOnly(libs.jakarta.inject.api)

testCompileOnly(libs.jakarta.inject.api)

testImplementation(mn.micronaut.inject.groovy)
testImplementation(mn.micronaut.http.server.netty)
testImplementation(mn.micronaut.http.client)

testImplementation(mnSql.micronaut.jdbc.hikari)
testImplementation(libs.micronaut.hibernate.validator)
// testImplementation(mn.micronaut.hibernate.gorm)
testImplementation(mnSpring.micronaut.spring)
testImplementation(mn.snakeyaml)
testImplementation(mnReactor.micronaut.reactor)
Expand Down
13 changes: 7 additions & 6 deletions test-suite-at-sql-jpa/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@ repositories {

dependencies {
annotationProcessor(mn.micronaut.inject.java)
testAnnotationProcessor(mn.micronaut.inject.java)

annotationProcessor(mnData.micronaut.data.processor)

implementation(mnData.micronaut.data.hibernate.jpa)
implementation(mnSql.micronaut.jdbc.hikari)
runtimeOnly(mnSql.postgresql)

runtimeOnly(mnSql.postgresql)
runtimeOnly(mnLogging.logback.classic)

testImplementation(libs.junit.jupiter.api)
testImplementation(projects.micronautTestJunit5)
testRuntimeOnly(libs.junit.jupiter.engine)
testAnnotationProcessor(mn.micronaut.inject.java)

testImplementation(platform(libs.testcontainers.bom))
testImplementation(libs.managed.junit.jupiter.api)
testImplementation(projects.micronautTestJunit5)
testImplementation(libs.testcontainers)
testImplementation(libs.testcontainers.postgresql)

testRuntimeOnly(libs.managed.junit.jupiter.engine)
}
tasks.withType<Test> {
useJUnitPlatform()
Expand Down

0 comments on commit 5e24562

Please sign in to comment.