Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added junit-platform to managed block. #1101

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ repositories {

dependencies {
implementation(libs.micronaut.library.plugin)
implementation (libs.kotlin.gradle.plugin)
}
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ projectUrl=https://micronaut.io
githubSlug=micronaut-projects/micronaut-test
developers=Graeme Rocher


spocktests=test-spock/src/test/groovy/io/micronaut/test/spock
junit5tests=test-junit5/src/test/java/io/micronaut/test/junit5
kotesttests=test-kotest/src/test/kotlin/io/micronaut/test/kotest
Expand Down
31 changes: 16 additions & 15 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
[versions]
micronaut = "4.6.5"
micronaut-platform = "4.5.1"
micronaut-docs = "2.0.0"
groovy = "4.0.15"

managed-assertj = "3.26.3"
managed-hamcrest = "3.0"
managed-mockito = "5.12.0"
managed-mockk = "1.13.12"
managed-junit = "5.11.0"
managed-junit-platform = "1.11.0"
managed-rest-assured = "5.5.0"
managed-kotest = "5.9.1"
managed-spock = "2.3-groovy-4.0"
managed-bytebuddy = "1.14.19"

kotlin = "1.9.25"
graal-svm = "24.0.2"

micronaut = "4.6.5"
micronaut-platform = "4.5.1"
micronaut-docs = "2.0.0"
micronaut-test = "4.4.0"
micronaut-data = "4.9.3"
micronaut-hibernate-validator = "4.4.0"
micronaut-logging = "1.3.0"
micronaut-hibernate-validator = "4.5.0"
micronaut-logging = "1.4.0"
micronaut-r2dbc = "5.6.1"
micronaut-serde = "2.11.0"
micronaut-spring = "5.8.0"
Expand All @@ -34,9 +32,9 @@ micronaut-gradle-plugin = "4.4.2"
# Core
micronaut-core = { module = 'io.micronaut:micronaut-core-bom', version.ref = 'micronaut' }
micronaut-platform = { module = 'io.micronaut.platform:micronaut-platform', version.ref = 'micronaut-platform' }

micronaut-logging = { module = "io.micronaut.logging:micronaut-logging-bom", version.ref = "micronaut-logging" }
micronaut-data = { module = "io.micronaut.data:micronaut-data-bom", version.ref = "micronaut-data" }
micronaut-hibernate-validator = { module = "io.micronaut.beanvalidation:micronaut-hibernate-validator", version.ref = "micronaut-hibernate-validator" }
micronaut-hibernate-validator = { module = "io.micronaut.beanvalidation:micronaut-hibernate-validator-bom", version.ref = "micronaut-hibernate-validator" }
micronaut-r2dbc = { module = "io.micronaut.r2dbc:micronaut-r2dbc-bom", version.ref = "micronaut-r2dbc" }
micronaut-serde = { module = "io.micronaut.serde:micronaut-serde-bom", version.ref = "micronaut-serde" }
micronaut-spring = { module = "io.micronaut.spring:micronaut-spring-bom", version.ref = "micronaut-spring" }
Expand All @@ -59,6 +57,14 @@ managed-junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-param
managed-junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "managed-junit" }
managed-junit-vintage-engine = { module = "org.junit.vintage:junit-vintage-engine", version.ref = "managed-junit" }

managed-junit-platform-suite-engine = { module = "org.junit.platform:junit-platform-suite-engine", version.ref = "managed-junit-platform" }
managed-junit-platform-suite = { module = "org.junit.platform:junit-platform-suite-engine", version.ref = "managed-junit-platform" }
managed-junit-platform-suite-api = { module = "org.junit.platform:junit-platform-suite-engine", version.ref = "managed-junit-platform" }
managed-junit-platform-launcher = { module = "org.junit.platform:junit-platform-suite-engine", version.ref = "managed-junit-platform" }
managed-junit-platform-runner = { module = "org.junit.platform:junit-platform-suite-engine", version.ref = "managed-junit-platform" }
managed-junit-platform-engine = { module = "org.junit.platform:junit-platform-suite-engine", version.ref = "managed-junit-platform" }
managed-junit-platform-console = { module = "org.junit.platform:junit-platform-suite-engine", version.ref = "managed-junit-platform" }

managed-bytebuddy = { module = "net.bytebuddy:byte-buddy", version.ref = "managed-bytebuddy" }
managed-bytebuddy-agent = { module = "net.bytebuddy:byte-buddy-agent", version.ref = "managed-bytebuddy" }

Expand All @@ -76,8 +82,3 @@ 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" }
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" }
groovy = { module = "org.apache.groovy:groovy" }

kotlin-gradle-plugin = { module = 'org.jetbrains.kotlin:kotlin-gradle-plugin', version.ref = 'kotlin' }
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ micronautBuild {
importMicronautCatalog("micronaut-reactor")
importMicronautCatalog("micronaut-test")
importMicronautCatalog("micronaut-test-resources")
importMicronautCatalog("micronaut-hibernate-validator")
}

rootProject.name = 'test-parent'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.io.InputStream;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -59,7 +58,6 @@ private TestSqlAnnotationHandler() {
* @param applicationContext The application context
* @param phase The {@link Sql.Phase} to run the scripts in
*
* @throws SQLException If an error occurs executing the SQL
* @throws IOException If an error occurs reading the SQL
*/
public static void handle(BeanDefinition<?> specDefinition, ApplicationContext applicationContext, Sql.Phase phase) throws IOException {
Expand Down
6 changes: 2 additions & 4 deletions test-junit5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ dependencies {

compileOnly(libs.graal.svm)

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

implementation(mn.micronaut.context)

testCompileOnly(mn.micronaut.inject)

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

Expand All @@ -55,8 +53,8 @@ dependencies {
testImplementation(libs.managed.hamcrest)
testImplementation(mnData.micronaut.data.tx)
testImplementation(mnData.micronaut.data.hibernate.jpa)
testImplementation(mn.snakeyaml)

testRuntimeOnly(mn.snakeyaml)
testRuntimeOnly(mnLogging.logback.classic)
testRuntimeOnly(mnSql.micronaut.jdbc.tomcat)
testRuntimeOnly(mnSql.h2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
* By default, with JUnit 5 the test method parameters will be resolved to beans if possible.
* This behaviour can be problematic if in combination with the {@code ParameterizedTest} annotation.
* Setting this member to {@code false} will completely disable bean resolution for method parameters.
* <p>
*
* @return Whether to resolve test method parameters as beans.
*/
Expand Down
1 change: 1 addition & 0 deletions test-junit5/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<withJansi>false</withJansi>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
Expand Down
10 changes: 5 additions & 5 deletions test-kotest5/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "io.micronaut.build.internal.micronaut-test-module"
id "org.jetbrains.kotlin.jvm"
id "org.jetbrains.kotlin.kapt"
alias(mn.plugins.kotlin.jvm)
alias(mn.plugins.kotlin.kapt)
}

dependencies {
Expand All @@ -14,9 +14,9 @@ dependencies {
api(libs.managed.kotest.runner.junit5.jvm)

implementation(mn.micronaut.inject)
implementation projects.micronautTestJunit5
implementation(libs.kotlin.stdlib.jdk8)
implementation(libs.kotlin.reflect)
implementation(projects.micronautTestJunit5)
implementation(mn.kotlin.stdlib.jdk8)
implementation(mn.kotlin.reflect)

kaptTest(platform(mn.micronaut.core.bom))
kaptTest(mn.micronaut.inject.java)
Expand Down
1 change: 1 addition & 0 deletions test-kotest5/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<withJansi>false</withJansi>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
Expand Down
2 changes: 1 addition & 1 deletion test-rest-assured/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
exclude group:"org.codehaus.groovy", module:"groovy"
}
implementation(mn.micronaut.context)
implementation(libs.groovy)
implementation(mn.groovy)

testAnnotationProcessor(mn.micronaut.inject.java)

Expand Down
1 change: 1 addition & 0 deletions test-rest-assured/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<withJansi>false</withJansi>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
Expand Down
6 changes: 3 additions & 3 deletions test-spock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {
compileOnly(libs.jakarta.inject.api)

api(platform(libs.boms.spock))
api projects.micronautTestCore
api(projects.micronautTestCore)
api(mn.micronaut.inject)
api(libs.spock.core) {
exclude group: "org.codehaus.groovy", module: "groovy-all"
Expand All @@ -21,11 +21,11 @@ dependencies {
testImplementation(mn.micronaut.http.server.netty)
testImplementation(mn.micronaut.http.client)
testImplementation(mnSql.micronaut.jdbc.hikari)
testImplementation(libs.micronaut.hibernate.validator)
testImplementation(mnHibernateValidator.micronaut.hibernate.validator)
testImplementation(mnSpring.micronaut.spring)
testImplementation(mn.snakeyaml)
testImplementation(mnReactor.micronaut.reactor)

testRuntimeOnly(mn.snakeyaml)
testRuntimeOnly(mnLogging.logback.classic)
testRuntimeOnly(mnSerde.micronaut.serde.jackson)
testRuntimeOnly(mnSql.h2)
Expand Down
1 change: 1 addition & 0 deletions test-spock/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<withJansi>false</withJansi>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
Expand Down
1 change: 1 addition & 0 deletions test-suite-at-sql-jpa/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies {
testImplementation(mnTestResources.testcontainers.postgres)
testImplementation(platform(mnTestResources.boms.testcontainers))
testImplementation(libs.testcontainers.junit.jupiter)

testRuntimeOnly(libs.managed.junit.jupiter.engine)
}

Expand Down
1 change: 1 addition & 0 deletions test-suite-at-sql-jpa/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<withJansi>false</withJansi>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
Expand Down
1 change: 1 addition & 0 deletions test-suite-sql-r2dbc/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<withJansi>false</withJansi>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
Expand Down
3 changes: 1 addition & 2 deletions test-type-pollution/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ tasks.withType<Test> {
}

micronautBuild {
// todo: enable after 4.4.0
binaryCompatibility {
enabled.set(false)
enabled.set(true)
}
}
Loading