blob: dfb1434aaa1ee2b54fbaa2ad2abdb7dbd9b45ba3 [file] [log] [blame]
/*
* Copyright 2017-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
apply plugin: 'java' // Needed for protobuf plugin only
apply plugin: 'kotlin-multiplatform'
apply plugin: 'kotlinx-serialization'
apply plugin: 'com.google.protobuf'
apply from: rootProject.file("gradle/native-targets.gradle")
apply from: rootProject.file("gradle/configure-source-sets.gradle")
protobuf {
protoc {
// Download from repositories
artifact = 'com.google.protobuf:protoc:3.0.0'
}
}
clean {
delete protobuf.generatedFilesBaseDir
}
kotlin {
sourceSets {
commonMain {
dependencies {
api project(":kotlinx-serialization-core")
}
}
jvmTest {
kotlin.srcDirs += file("${protobuf.generatedFilesBaseDir}/test/java")
dependencies {
implementation 'com.google.protobuf:protobuf-java:3.0.0'
implementation 'io.kotlintest:kotlintest:2.0.7'
}
}
}
}
sourceSets.test.proto {
srcDirs = ['testProto']
}
compileTestKotlinJvm {
dependsOn 'generateTestProto'
}