plugins {
    // Provide convenience executables for trying out the examples.
    id 'application'
    id 'com.google.protobuf' version '0.9.1'
    // Generate IntelliJ IDEA's .idea & .iml project files
    id 'idea'
}

repositories {
    maven { // The google mirror is less flaky than mavenCentral()
        url "https://maven-central.storage-download.googleapis.com/maven2/" }
    mavenCentral()
    mavenLocal()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

// IMPORTANT: You probably want the non-SNAPSHOT version of gRPC. Make sure you
// are looking at a tagged version of the example and not "master"!

// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.56.1-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.22.3'
def protocVersion = protobufVersion

dependencies {
    implementation "io.grpc:grpc-protobuf:${grpcVersion}"
    implementation "io.grpc:grpc-services:${grpcVersion}"
    implementation "io.grpc:grpc-stub:${grpcVersion}"
    compileOnly "org.apache.tomcat:annotations-api:6.0.53"

    // examples/advanced need this for JsonFormat
    implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"

    runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"

    testImplementation "io.grpc:grpc-testing:${grpcVersion}"
    testImplementation "junit:junit:4.13.2"
    testImplementation "org.mockito:mockito-core:3.4.0"
}

protobuf {
    protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
    plugins {
        grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
    }
    generateProtoTasks {
        all()*.plugins { grpc {} }
    }
}

// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
    main {
        java {
            srcDirs 'build/generated/source/proto/main/grpc'
            srcDirs 'build/generated/source/proto/main/java'
        }
    }
}

startScripts.enabled = false

// Creates start scripts for a class name and adds it to the distribution. The
// base class name is used to name the task and scripts. For example, passed
// the class io.grpc.examples.helloworld.HelloWorldClient, it creates the task
// helloWorldClient with script name hello-world-client.
def createStartScripts(String mainClassName) {
    String bareName = mainClassName.substring(mainClassName.lastIndexOf('.') + 1);
    String taskName = bareName.uncapitalize();
    def newTask = tasks.register(taskName, CreateStartScripts) {
        mainClass = mainClassName
        applicationName = taskName.replaceAll('([A-Z])') { '-' + it[0].uncapitalize() }
        outputDir = new File(project.buildDir, 'tmp/scripts/' + name)
        classpath = startScripts.classpath
    }
    applicationDistribution.into('bin') {
        from(newTask)
        fileMode = 0755
    }
}

createStartScripts('io.grpc.examples.advanced.HelloJsonClient')
createStartScripts('io.grpc.examples.advanced.HelloJsonServer')
createStartScripts('io.grpc.examples.cancellation.CancellationClient')
createStartScripts('io.grpc.examples.cancellation.CancellationServer')
createStartScripts('io.grpc.examples.customloadbalance.CustomLoadBalanceClient')
createStartScripts('io.grpc.examples.deadline.DeadlineClient')
createStartScripts('io.grpc.examples.deadline.DeadlineServer')
createStartScripts('io.grpc.examples.errordetails.ErrorDetailsExample')
createStartScripts('io.grpc.examples.experimental.CompressingHelloWorldClient')
createStartScripts('io.grpc.examples.grpcproxy.GrpcProxy')
createStartScripts('io.grpc.examples.healthservice.HealthServiceClient')
createStartScripts('io.grpc.examples.healthservice.HealthServiceServer')
createStartScripts('io.grpc.examples.hedging.HedgingHelloWorldClient')
createStartScripts('io.grpc.examples.hedging.HedgingHelloWorldServer')
createStartScripts('io.grpc.examples.helloworld.HelloWorldClient')
createStartScripts('io.grpc.examples.helloworld.HelloWorldServer')
createStartScripts('io.grpc.examples.keepalive.KeepAliveClient')
createStartScripts('io.grpc.examples.keepalive.KeepAliveServer')
createStartScripts('io.grpc.examples.loadbalance.LoadBalanceClient')
createStartScripts('io.grpc.examples.loadbalance.LoadBalanceServer')
createStartScripts('io.grpc.examples.manualflowcontrol.ManualFlowControlClient')
createStartScripts('io.grpc.examples.manualflowcontrol.ManualFlowControlServer')
createStartScripts('io.grpc.examples.multiplex.MultiplexingServer')
createStartScripts('io.grpc.examples.multiplex.SharingClient')
createStartScripts('io.grpc.examples.nameresolve.NameResolveClient')
createStartScripts('io.grpc.examples.nameresolve.NameResolveServer')
createStartScripts('io.grpc.examples.retrying.RetryingHelloWorldClient')
createStartScripts('io.grpc.examples.retrying.RetryingHelloWorldServer')
createStartScripts('io.grpc.examples.routeguide.RouteGuideClient')
createStartScripts('io.grpc.examples.routeguide.RouteGuideServer')
createStartScripts('io.grpc.examples.waitforready.WaitForReadyClient')
