Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
142a070
commit 39032e7
Showing
10 changed files
with
481 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,18 @@ | ||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
replay_pid* | ||
HELP.md | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
target/ | ||
.idea/ | ||
.DS_Store | ||
db.backup/ | ||
logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# spring-integration-tests | ||
Showcase for integration tests in Spring Boot | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
group = "pl.kurczyna" | ||
version = "1.0-SNAPSHOT" | ||
java.sourceCompatibility = JavaVersion.VERSION_17 | ||
|
||
val spockVersion: String by project | ||
val groovyVersion: String by project | ||
val jacksonVersion: String by project | ||
|
||
plugins { | ||
id("org.springframework.boot") version "3.1.1" | ||
id("io.spring.dependency-management") version "1.1.0" | ||
id("org.jlleitschuh.gradle.ktlint") version "11.4.2" | ||
kotlin("jvm") version "1.8.22" | ||
kotlin("plugin.spring") version "1.8.22" | ||
idea | ||
groovy | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url = uri("https://repo.spring.io/milestone") } | ||
maven { url = uri("https://packages.confluent.io/maven") } | ||
} | ||
|
||
sourceSets { | ||
create("itest") { | ||
compileClasspath += sourceSets.main.get().output | ||
compileClasspath += sourceSets.test.get().output | ||
runtimeClasspath += sourceSets.main.get().output | ||
runtimeClasspath += sourceSets.test.get().output | ||
} | ||
} | ||
|
||
idea.module { | ||
testSourceDirs = testSourceDirs + project.sourceSets["itest"].allJava.srcDirs + project.sourceSets["test"].allJava.srcDirs | ||
} | ||
|
||
configurations["itestRuntimeOnly"].extendsFrom(configurations.runtimeOnly.get()) | ||
|
||
val itestImplementation: Configuration by configurations.getting { | ||
extendsFrom(configurations.implementation.get()) | ||
} | ||
|
||
dependencies { | ||
implementation("org.springframework.boot:spring-boot-starter-actuator") | ||
implementation("org.springframework.boot:spring-boot-starter-web") | ||
implementation("org.jetbrains.kotlin:kotlin-reflect") | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") | ||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") | ||
implementation("org.springframework.kafka:spring-kafka") | ||
testImplementation("org.springframework.boot:spring-boot-starter-test") | ||
testImplementation("org.spockframework:spock-core:$spockVersion") | ||
testImplementation("org.spockframework:spock-spring:$spockVersion") | ||
testImplementation("org.apache.groovy:groovy-all:$groovyVersion") | ||
itestImplementation("org.springframework.boot:spring-boot-starter-test") | ||
itestImplementation("org.spockframework:spock-core:$spockVersion") | ||
itestImplementation("org.spockframework:spock-spring:$spockVersion") | ||
itestImplementation("org.apache.groovy:groovy-all:$groovyVersion") | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
kotlinOptions { | ||
freeCompilerArgs = listOf("-Xjsr305=strict") | ||
jvmTarget = "17" | ||
} | ||
} | ||
|
||
tasks.withType<Test> { | ||
useJUnitPlatform() | ||
} | ||
|
||
// ITests | ||
val itest = task<Test>("itest") { | ||
description = "Runs integration tests." | ||
group = "verification" | ||
|
||
testClassesDirs = sourceSets["itest"].output.classesDirs | ||
classpath = sourceSets["itest"].runtimeClasspath | ||
|
||
shouldRunAfter("test") | ||
} | ||
|
||
tasks.build { | ||
dependsOn(tasks.check) | ||
} | ||
|
||
tasks.check { | ||
dependsOn(tasks.ktlintCheck) | ||
dependsOn(tasks.test) | ||
dependsOn(itest) | ||
} | ||
|
||
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> { | ||
outputToConsole.set(true) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
spockVersion=2.3-groovy-4.0 | ||
groovyVersion=4.0.10 | ||
jacksonVersion=2.15.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.