Newer
Older
pivot-app / build.gradle
plugins {
    id 'java'
    id 'org.springframework.boot' version "${springBootVersion}"
    id 'io.spring.dependency-management' version "${springDependencyManagementVersion}"
}

group = projectGroup
version = projectVersion

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(javaVersion as int)
    }
}

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-validation'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    // OpenAPI/Swagger
    implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springdocVersion}"
    runtimeOnly "org.postgresql:postgresql:${postgresqlVersion}"
    implementation "org.flywaydb:flyway-core:${flywayVersion}"
    implementation "org.flywaydb:flyway-database-postgresql:${flywayVersion}"
    compileOnly "org.projectlombok:lombok:${lombokVersion}"
    annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
    implementation "org.mapstruct:mapstruct:${mapstructVersion}"
    annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
    implementation "net.datafaker:datafaker:${datafakerVersion}"
    implementation "org.apache.commons:commons-lang3:${commonsLangVersion}"
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'org.springframework.boot:spring-boot-testcontainers'
    testImplementation "org.testcontainers:postgresql:${testcontainersVersion}"
    testImplementation "org.testcontainers:junit-jupiter:${testcontainersVersion}"
    testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
    testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
}

tasks.named('test') { useJUnitPlatform() }

tasks.withType(JavaCompile).configureEach {
    options.compilerArgs += ['-Amapstruct.defaultComponentModel=spring', '-Amapstruct.unmappedTargetPolicy=IGNORE']
}