Skip to content

Commit ec296fb

Browse files
committed
grpc-native: Small fixes
Signed-off-by: Johannes Zottele <[email protected]>
1 parent 70e0566 commit ec296fb

File tree

7 files changed

+25
-6
lines changed

7 files changed

+25
-6
lines changed

compiler-plugin/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242

4343
# set to true when building IDE compiler plugin artifacts
4444
kotlinx.rpc.forIdeBuild=false
45+
46+
# enable code sharing between similar native targets:
47+
# https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-share-on-platforms.html
48+
kotlin.mpp.enableCInteropCommonization=true

dokka-plugin/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242

4343
# set to true when building IDE compiler plugin artifacts
4444
kotlinx.rpc.forIdeBuild=false
45+
46+
# enable code sharing between similar native targets:
47+
# https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-share-on-platforms.html
48+
kotlin.mpp.enableCInteropCommonization=true

gradle-conventions/src/main/kotlin/conventions-root.gradle.kts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import util.other.isPublicModule
66
import util.other.libs
77
import util.setupPage
88
import util.tasks.*
9+
import java.io.OutputStream
910
import java.nio.file.Path
1011
import kotlin.io.path.*
1112

@@ -115,11 +116,9 @@ gradle.afterProject {
115116
tasks.register<Exec>("checkBazel") {
116117
commandLine("which", "bazel")
117118
isIgnoreExitValue = true
119+
standardOutput = OutputStream.nullOutputStream()
118120
doLast {
119-
if (executionResult.get().exitValue == 0) {
120-
val path = standardOutput.toString().trim()
121-
logger.debug("bazel: {}", path)
122-
} else {
121+
if (executionResult.get().exitValue != 0) {
123122
throw GradleException("'bazel' not found on PATH. Please install Bazel (https://bazel.build/).")
124123
}
125124
}

gradle-conventions/src/main/kotlin/util/cinterop.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fun KotlinMultiplatformExtension.configureCLibDependency(
103103

104104
if (bazelExtractIncludeTask != null) {
105105
project.tasks.register<Exec>("buildIncludeDirCLib${buildTargetName.capitalized()}") {
106-
dependsOn("checkBazel")
106+
dependsOn(":checkBazel")
107107
group = "build"
108108
workingDir = project.cinteropLibDir
109109
commandLine(
@@ -155,7 +155,7 @@ private fun TaskContainer.registerBuildClibTask(
155155
inputs.files(project.fileTree(project.cinteropLibDir) { exclude("bazel-*/**", "prebuilt-deps/**") })
156156
outputs.files(outFile)
157157

158-
dependsOn("checkBazel")
158+
dependsOn(":checkBazel")
159159
}
160160
}
161161

gradle-plugin/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242

4343
# set to true when building IDE compiler plugin artifacts
4444
kotlinx.rpc.forIdeBuild=false
45+
46+
# enable code sharing between similar native targets:
47+
# https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-share-on-platforms.html
48+
kotlin.mpp.enableCInteropCommonization=true

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242

4343
# set to true when building IDE compiler plugin artifacts
4444
kotlinx.rpc.forIdeBuild=false
45+
46+
# enable code sharing between similar native targets:
47+
# https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-share-on-platforms.html
48+
kotlin.mpp.enableCInteropCommonization=true

protoc-gen/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242

4343
# set to true when building IDE compiler plugin artifacts
4444
kotlinx.rpc.forIdeBuild=false
45+
46+
# enable code sharing between similar native targets:
47+
# https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-share-on-platforms.html
48+
kotlin.mpp.enableCInteropCommonization=true

0 commit comments

Comments
 (0)