plugins {
    id 'java'
    id 'org.springframework.boot' version "$springBootVersion"
    id 'io.spring.dependency-management' version '1.1.0'
}

repositories {
    mavenCentral()
}

dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion"
    }
}

dependencies {

    implementation "org.babyfish.jimmer:jimmer-spring-boot-starter:$jimmerVersion"

    // If Jimmer's remote association is used,
    // please manually add the ANTLR runtime dependency.
    // Otherwise, it is unnecessary
    implementation "org.antlr:antlr4-runtime:$antlrVersion"

    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
    implementation 'org.springframework.cloud:spring-cloud-starter-loadbalancer'

    implementation(project(":model"))

    runtimeOnly 'com.h2database:h2'

    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}

java {
    toolchain { 
        languageVersion = JavaLanguageVersion.of(8)
    }
}

test {
    useJUnitPlatform()
}
