2021-05-29 13:45:33 +03:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
idea
|
|
|
|
kotlin("jvm")
|
2023-11-07 21:10:05 +03:00
|
|
|
id("com.google.protobuf") version "0.9.4"
|
2021-05-29 13:45:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-11-07 21:10:05 +03:00
|
|
|
api("com.google.protobuf:protobuf-java:3.25.0")
|
2021-05-29 13:45:33 +03:00
|
|
|
api(project(":numass-core:numass-data-api"))
|
|
|
|
api(project(":dataforge-storage"))
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
|
|
dependsOn(":numass-core:numass-data-proto:generateProto")
|
|
|
|
}
|
|
|
|
|
|
|
|
//sourceSets {
|
|
|
|
// create("proto") {
|
|
|
|
// proto {
|
|
|
|
// srcDir("src/main/proto")
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|
protobuf {
|
|
|
|
// Configure the protoc executable
|
|
|
|
protoc {
|
|
|
|
// Download from repositories
|
2023-11-07 21:10:05 +03:00
|
|
|
artifact = "com.google.protobuf:protoc:3.25.0"
|
2021-05-29 13:45:33 +03:00
|
|
|
}
|
|
|
|
generatedFilesBaseDir = "$projectDir/gen"
|
|
|
|
}
|
|
|
|
|
|
|
|
//tasks.getByName("clean").doLast{
|
|
|
|
// delete(protobuf.protobuf.generatedFilesBaseDir)
|
|
|
|
//}
|