plugins {
    id 'org.springframework.boot' version '2.7.0'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
}

repositories {
    mavenCentral()
}

dependencies {

    implementation project(":repository")
    implementation project(":runtime")

    implementation "org.babyfish.jimmer:jimmer-spring-boot-starter:${jimmerVersion}"
    annotationProcessor "org.babyfish.jimmer:jimmer-apt:${jimmerVersion}"

    /*
     * Optional runtime dependency: jimmer-client-swagger.
     *
     * Generally speaking, even if you remove the dependency,
     * the functionality is normal, that why it is optional.
     *
     * Without this dependency, the `/openapi.html` uses external links:
     *     'https://unpkg.com/swagger-ui-dist@${version}/swagger-ui.css' and
     *     'https://unpkg.com/swagger-ui-dist@${version}/swagger-ui-bundle.js'.
     *
     * However, You may be in a restricted network environment so that
     * such external links are not accessible. If you are in trouble with this,
     * please add this runtime dependency to use the embedded css and js.
     */
    runtimeOnly "org.babyfish.jimmer:jimmer-client-swagger:${jimmerVersion}"

    implementation 'org.springframework.boot:spring-boot-starter-web'

    runtimeOnly 'com.h2database:h2:2.1.212'
    runtimeOnly 'mysql:mysql-connector-java:8.0.30'
    runtimeOnly 'org.postgresql:postgresql:42.6.0'
    runtimeOnly 'io.lettuce:lettuce-core:6.2.0.RELEASE'
    runtimeOnly 'com.github.ben-manes.caffeine:caffeine:2.9.1'
}

java {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

