import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id 'org.springframework.boot' version '3.1.4' id 'io.spring.dependency-management' version '1.1.3' id 'org.jetbrains.kotlin.jvm' version '1.8.22' id 'org.jetbrains.kotlin.plugin.spring' version '1.8.22' id "org.jetbrains.kotlin.plugin.jpa" version '1.8.22' id 'groovy' id 'pl.allegro.tech.build.axion-release' version '1.15.1' } group = 'net.schowek' project.version = scmVersion.version java { sourceCompatibility = '17' } jar { enabled = false } repositories { mavenCentral() } configurations { integrationTestImplementation.extendsFrom(testImplementation) integrationTestRuntimeOnly.extendsFrom(testRuntimeOnly) } dependencies { implementation('org.springframework.boot:spring-boot-starter-web') { exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat' } implementation 'org.springframework.boot:spring-boot-starter-undertow' implementation 'com.fasterxml.jackson.module:jackson-module-kotlin' implementation 'org.jetbrains.kotlin:kotlin-reflect' implementation 'io.github.microutils:kotlin-logging:3.0.5' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.mariadb.jdbc:mariadb-java-client:3.2.0' implementation 'org.jupnp:org.jupnp:2.7.1' implementation 'org.jupnp:org.jupnp.support:2.7.1' implementation 'org.osgi:org.osgi.service.http:1.2.2' implementation 'org.apache.httpcomponents:httpclient:4.5.14' // to avoid snakeyaml-1.3 vulnerability CVE-2022-1471 implementation 'org.yaml:snakeyaml:2.2' testImplementation 'org.apache.groovy:groovy:4.0.15' testImplementation('org.spockframework:spock-core:2.4-M1-groovy-4.0') testImplementation('org.spockframework:spock-spring:2.4-M1-groovy-4.0') testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' } testImplementation('com.h2database:h2') } tasks.withType(KotlinCompile).configureEach { kotlinOptions { freeCompilerArgs += '-Xjsr305=strict' jvmTarget = '17' } } tasks.named('test') { useJUnitPlatform() } sourceSets { integrationTest { groovy.srcDir "$projectDir/src/integration/groovy" resources.srcDir "$projectDir/src/integration/resources" compileClasspath += main.output + test.output runtimeClasspath += main.output + test.output } } tasks.register('integrationTest', Test) { useJUnitPlatform() description = "Run integration tests" group = "verification" testClassesDirs = sourceSets.integrationTest.output.classesDirs classpath = sourceSets.integrationTest.runtimeClasspath mustRunAfter tasks.test } check.dependsOn integrationTest