plugins {
    id 'org.springframework.boot' version '2.5.2'
    id 'java'
    id 'application'
}

group 'io.durabletask'
version = '0.1.0'
def grpcVersion = '1.59.0'
archivesBaseName = 'durabletask-samples'

repositories {
    mavenLocal()
    mavenCentral()
}

task runWebApi(type: JavaExec) {
    classpath = sourceSets.main.runtimeClasspath
    mainClass = 'io.durabletask.samples.WebApi'
}

dependencies {
    implementation("com.microsoft:durabletask-client:1.5.1")
    implementation("com.microsoft:durabletask-azuremanaged:1.5.1-preview.1")

    implementation platform("org.springframework.boot:spring-boot-dependencies:2.5.2")
    implementation 'org.springframework.boot:spring-boot-starter'
    implementation 'org.springframework.boot:spring-boot-starter-web'

    // Logging dependencies
    implementation 'ch.qos.logback:logback-classic:1.2.6'
    implementation 'org.slf4j:slf4j-api:1.7.32'

    // https://github.com/grpc/grpc-java#download
    implementation "io.grpc:grpc-protobuf:${grpcVersion}"
    implementation "io.grpc:grpc-stub:${grpcVersion}"
    runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"
    implementation 'com.azure:azure-identity:1.15.0'

    // install lombok
    annotationProcessor 'org.projectlombok:lombok:1.18.22'
    compileOnly 'org.projectlombok:lombok:1.18.22'
}