plugins {
    id 'org.springframework.boot' version '2.5.15'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
    id "com.gorylenko.gradle-git-properties" version "${gradleGitCommitVersion}"
}

jar {
    manifest {
        attributes 'Main-Class': 'io.dingodb.web.DingoWebApplication'
    }
}

dependencies {
    implementation project(':dingo-store-proxy')
    implementation project(':dingo-meta-api')
    implementation project(':dingo-codec-api')
    implementation project(':dingo-partition-base')
    implementation project(':dingo-partition-api')
    implementation project(':dingo-tso-api')
    implementation project(':dingo-net-api')
    implementation project(':dingo-net-netty')
    implementation group: 'io.grpc', name: 'grpc-core', version: 'grpc'.v()
    implementation group: 'io.grpc', name: 'grpc-netty-shaded', version: 'grpc'.v()
    implementation group: 'io.grpc', name: 'grpc-stub', version: 'grpc'.v()
    implementation group: 'io.grpc', name: 'grpc-api', version: 'grpc'.v()
    implementation group: 'io.grpc', name: 'grpc-protobuf', version: 'grpc'.v()
    implementation group: 'org.slf4j', name: 'slf4j-api', version: 'slf4j'.v()
    implementation group: 'ch.qos.logback', name: 'logback-classic', version: 'logback'.v()
    implementation group: 'ch.qos.logback', name: 'logback-core', version: 'logback'.v()

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

    implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'
    implementation group: 'org.mapstruct', name: 'mapstruct', version: 'mapstruct'.v()

    implementation group: 'net.sf.ehcache', name: 'ehcache', version: 'ehcache'.v()
    implementation group: 'org.springframework.boot', name: 'spring-boot-starter-cache', version: 'springcache'.v()

    implementation project(":dingo-common")
    implementation project(":dingo-verify")

    implementation ("io.dingodb:dingo-sdk:$project.version") {
        exclude group: 'io.grpc', module: 'grpc-netty-shaded'
    }
    implementation group: 'io.dingodb.expr', name: 'dingo-expr-runtime', version: 'dingo-expr'.v()
    implementation group: 'org.yaml', name: 'snakeyaml', version: 'snakeyaml'.v()
    implementation group: 'org.apache.commons', name: 'commons-lang3', version: 'commons-lang3'.v()
    implementation group: 'io.grpc', name: 'grpc-stub', version: 'grpc'.v()

    compileOnly group: 'org.projectlombok', name: 'lombok', version: 'lombok'.v()
    annotationProcessor group: 'org.projectlombok', name: 'lombok', version: 'lombok'.v()
    annotationProcessor group: 'org.mapstruct', name: 'mapstruct-processor', version: 'mapstruct'.v()
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    runtimeOnly group: 'mysql', name:'mysql-connector-java', version: 'mysql-connector'.v()
}

test {
    useJUnitPlatform()
}
