plugins {
    id "com.google.protobuf" version "0.8.19"
    id "java"
}
repositories {
    gradlePluginPortal()
}

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(17))
    }
}
protobuf {
    protoc {
        artifact = 'com.google.protobuf:protoc:3.0.0'
    }
}

sourceSets {
    main {
        java {
            srcDirs 'build/generated/source/proto/main/grpc'
            srcDirs 'build/generated/source/proto/main/java'
        }
    }
}

dependencies {
    protobuf files ("def/")

    implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.0.0'
}