nextcloud-dlna/build.gradle

93 lines
2.8 KiB
Groovy
Raw Normal View History

2023-10-08 08:46:54 +00:00
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
2023-10-11 15:18:26 +00:00
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'
2023-10-14 10:45:19 +00:00
id 'groovy'
2023-10-17 13:52:03 +00:00
id 'pl.allegro.tech.build.axion-release' version '1.15.1'
2023-10-08 08:46:54 +00:00
}
group = 'net.schowek'
2023-10-17 13:52:03 +00:00
project.version = scmVersion.version
2023-10-08 08:46:54 +00:00
java {
2023-10-11 15:18:26 +00:00
sourceCompatibility = '17'
2023-10-08 08:46:54 +00:00
}
jar {
enabled = false
}
2023-10-08 08:46:54 +00:00
repositories {
2023-10-11 15:18:26 +00:00
mavenCentral()
2023-10-08 08:46:54 +00:00
}
2023-10-14 16:56:59 +00:00
configurations {
integrationTestImplementation.extendsFrom(testImplementation)
integrationTestRuntimeOnly.extendsFrom(testRuntimeOnly)
}
2023-10-08 08:46:54 +00:00
dependencies {
2023-10-11 15:18:26 +00:00
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'
2023-10-08 19:08:31 +00:00
2023-10-11 15:18:26 +00:00
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'io.github.microutils:kotlin-logging:3.0.5'
2023-10-08 19:08:31 +00:00
2023-10-11 15:18:26 +00:00
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.mariadb.jdbc:mariadb-java-client:3.2.0'
2023-10-22 10:52:25 +00:00
implementation 'org.postgresql:postgresql:42.6.0'
2023-10-08 19:08:31 +00:00
2023-10-11 15:18:26 +00:00
implementation 'org.jupnp:org.jupnp:2.7.1'
implementation 'org.jupnp:org.jupnp.support:2.7.1'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
2023-10-19 12:38:13 +00:00
// to avoid snakeyaml-1.3 vulnerability CVE-2022-1471
implementation 'org.yaml:snakeyaml:2.2'
2023-10-11 15:18:26 +00:00
2023-10-14 16:56:59 +00:00
testImplementation 'org.apache.groovy:groovy:4.0.15'
2023-10-14 10:45:19 +00:00
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'
}
2023-10-14 16:56:59 +00:00
testImplementation('com.h2database:h2')
2023-10-08 08:46:54 +00:00
}
2023-10-14 10:45:19 +00:00
tasks.withType(KotlinCompile).configureEach {
2023-10-11 15:18:26 +00:00
kotlinOptions {
freeCompilerArgs += '-Xjsr305=strict'
jvmTarget = '17'
}
2023-10-08 08:46:54 +00:00
}
tasks.named('test') {
2023-10-11 15:18:26 +00:00
useJUnitPlatform()
2023-10-08 08:46:54 +00:00
}
2023-10-14 10:45:19 +00:00
sourceSets {
2023-10-14 16:56:59 +00:00
integrationTest {
groovy.srcDir "$projectDir/src/integration/groovy"
resources.srcDir "$projectDir/src/integration/resources"
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
2023-10-14 10:45:19 +00:00
}
}
tasks.register('integrationTest', Test) {
2023-10-14 16:56:59 +00:00
useJUnitPlatform()
2023-10-14 10:45:19 +00:00
description = "Run integration tests"
group = "verification"
2023-10-14 16:56:59 +00:00
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
mustRunAfter tasks.test
2023-10-14 10:45:19 +00:00
}
2023-10-14 16:56:59 +00:00
check.dependsOn integrationTest