blob: 9f93b18fcb78f22305515b43d7ff6897352df4f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* Copyright 2017-2021 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.17.3'
}
}
clean {
delete protobuf.generatedFilesBaseDir
}
kotlin {
sourceSets {
configureEach {
languageSettings.optIn("kotlinx.serialization.internal.CoreFriendModuleApi")
}
commonMain {
dependencies {
api project(":kotlinx-serialization-core")
}
}
jvmTest {
kotlin.srcDirs += file("${protobuf.generatedFilesBaseDir}/test/java")
dependencies {
implementation 'com.google.protobuf:protobuf-java:3.17.3'
implementation 'io.kotlintest:kotlintest:2.0.7'
}
}
}
}
sourceSets.test.proto {
srcDirs = ['testProto', 'jvmTest/resources/common']
}
compileTestKotlinJvm {
dependsOn 'generateTestProto'
}
Java9Modularity.configureJava9ModuleInfo(project)
|