/*
 * Spring-boot Examples
 *
 * Copyright (c) 2021. Elex. All Rights Reserved.
 * https://www.elex-project.com/
 */

plugins {
    id("elex-spring-boot")

    id("org.springframework.boot") version "2.5.3"
    id("io.spring.dependency-management") version "1.0.11.RELEASE"

    id("org.asciidoctor.jvm.convert") version "3.3.0"
}

//var snippetsDir = file("build/generated-snippets")

tasks.test {
    //outputs.dir(snippetsDir)
    useJUnitPlatform()
}
tasks.asciidoctor {
    //inputs.dir(snippetsDir)
    dependsOn("test")
    //setSourceDir(File("src/main/asciidoc"))
    attributes(mapOf(
            "snippets" to "build/generated-snippets"
    ))
}

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-web")
    implementation("org.springframework.boot:spring-boot-starter-mustache")

    compileOnly("org.projectlombok:lombok")
    developmentOnly("org.springframework.boot:spring-boot-devtools")
    runtimeOnly("org.mariadb.jdbc:mariadb-java-client")

    annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
    annotationProcessor("org.projectlombok:lombok")

    testImplementation("org.springframework.boot:spring-boot-starter-test")
    testImplementation("org.springframework.restdocs:spring-restdocs-mockmvc")
}
