plugins {
    id "com.microsoft.azure.azurefunctions" version "1.9.0"
    id 'java'
}
apply plugin: 'java'
apply plugin: "com.microsoft.azure.azurefunctions"

group 'com.functions'
version '0.1.0-SNAPSHOT'

repositories {
    mavenLocal()
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots/"
    }
    mavenCentral()
}

dependencies {
    implementation 'com.microsoft:durabletask-azure-functions:1.0.0-beta.1'
    implementation 'com.microsoft.azure.functions:azure-functions-java-library:2.0.1'
    testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2'
    testImplementation 'org.mockito:mockito-core:3.3.3'
    runtimeOnly "io.grpc:grpc-netty-shaded:1.38.0"
}

compileJava.options.encoding = 'UTF-8'

azurefunctions {
    resourceGroup = 'java-functions-group'
    appName = 'durableJava'
    pricingTier = 'Consumption'
    region = 'westus'
    runtime {
        os = 'Windows'
        javaVersion = 'Java 17'
    }
    auth {
        type = 'azure_cli'
    }
    localDebug = "transport=dt_socket,server=y,suspend=n,address=5005"
}
