From 1797be00375fb7319ec7bb38b446d7f34e8021bd Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 9 Jun 2024 00:21:01 +0200 Subject: [PATCH] Add unit testing dependencies --- base/build.gradle | 24 ++++++++++++++++++++++-- build.gradle | 5 +++++ gradle.properties | 2 ++ testapp/build.gradle | 5 +++-- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/base/build.gradle b/base/build.gradle index edaaac5d..3bd808d7 100644 --- a/base/build.gradle +++ b/base/build.gradle @@ -4,23 +4,43 @@ plugins { } dependencies { + // -> Runtime <- // Lombok compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok - // JetBrains annotations + // JetBrains Annotations compileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations // ANSI support implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi + + // -> Testing <- + // Jetbrains Annotations + testCompileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations + + // JUnit + testImplementation platform('org.junit:junit-bom:5.' + project.dependencyJUnit) + testImplementation 'org.junit.jupiter:junit-jupiter:5.' + project.dependencyJUnit + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.' + project.dependencyJUnit + + // jOOR + testImplementation 'org.jooq:joor:' + project.dependencyjOOR } javadoc.options { setMemberLevel(JavadocMemberLevel.PUBLIC) setOverview("src/main/javadoc/overview.html") - setLocale("en_US"); + setLocale("en_US") setJFlags([ // Force Javadoc to use English translations "-Duser.language=en_US" ]) } + +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } +} diff --git a/build.gradle b/build.gradle index b2890908..f621b1f6 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,11 @@ dependencies { // Lombok compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok + + // JUnit + testImplementation platform('org.junit:junit-bom:5.' + project.dependencyJUnit) + testImplementation 'org.junit.jupiter:junit-jupiter:5.' + project.dependencyJUnit + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.' + project.dependencyJUnit } tasks.register('javadocAll', Javadoc) { diff --git a/gradle.properties b/gradle.properties index 281ae35a..639f44d8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,8 @@ versioningFork= dependencyLombok=1.18.32 dependencyJetbrainsAnnotations=24.1.0 dependencyJansi=2.4.1 +dependencyJUnit=11.0-M2 +dependencyjOOR=0.9.14 # Plugins pluginShadow=8.1.1 diff --git a/testapp/build.gradle b/testapp/build.gradle index d82ccde3..d7b0023c 100644 --- a/testapp/build.gradle +++ b/testapp/build.gradle @@ -6,14 +6,15 @@ plugins { } dependencies { + // -> Runtime <- // Lombok compileOnly 'org.projectlombok:lombok:' + project.dependencyLombok annotationProcessor 'org.projectlombok:lombok:' + project.dependencyLombok - // JetBrains annotations + // JetBrains Annotations compileOnly 'org.jetbrains:annotations:' + project.dependencyJetbrainsAnnotations - // Project + // -> Project <- implementation project(":base") }