meals-made-easy-api/build.gradle
2025-12-24 12:20:40 -06:00

99 lines
2.8 KiB
Groovy

plugins {
id 'java'
id 'org.springframework.boot' version '4.0.1'
id 'io.spring.dependency-management' version '1.1.7'
}
group = 'app.mealsmadeeasy'
version = '0.1.0-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
sourceSets {
testFixtures {
compileClasspath += main.output
}
integrationTest {
compileClasspath += main.output + testFixtures.output
runtimeClasspath += main.runtimeClasspath + testFixtures.runtimeClasspath
}
}
configurations {
testFixturesImplementation {
extendsFrom implementation
}
integrationTestImplementation {
extendsFrom implementation
extendsFrom testImplementation
}
integrationTestRuntimeOnly {
extendsFrom testRuntimeOnly
}
}
dependencies {
// From Spring Initalizr
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
implementation 'org.springframework.boot:spring-boot-starter-jackson'
runtimeOnly 'com.mysql:mysql-connector-j'
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testImplementation 'org.springframework.boot:spring-boot-starter-jackson-test'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// Custom
implementation 'io.jsonwebtoken:jjwt-api:0.13.0'
implementation 'io.jsonwebtoken:jjwt-jackson:0.13.0'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.13.0'
implementation 'org.commonmark:commonmark:0.27.0'
implementation 'org.jsoup:jsoup:1.21.2'
implementation 'tools.jackson.dataformat:jackson-dataformat-yaml:3.0.3'
implementation 'io.minio:minio:8.6.0'
compileOnly 'org.jetbrains:annotations:26.0.2-1'
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-webp
runtimeOnly 'com.twelvemonkeys.imageio:imageio-webp:3.12.0'
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-batik
runtimeOnly 'com.twelvemonkeys.imageio:imageio-batik:3.12.0'
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-all
runtimeOnly 'org.apache.xmlgraphics:batik-all:1.19'
// Custom testing
testRuntimeOnly 'com.h2database:h2'
testImplementation 'org.testcontainers:testcontainers:1.21.4'
testImplementation 'org.testcontainers:junit-jupiter:1.21.4'
testImplementation "org.testcontainers:minio:1.21.4"
testFixturesImplementation 'org.hamcrest:hamcrest:3.0'
}
tasks.register('integrationTest', Test) {
description = 'Run integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}