File tree Expand file tree Collapse file tree 7 files changed +25
-6
lines changed
gradle-conventions/src/main/kotlin Expand file tree Collapse file tree 7 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242
4343# set to true when building IDE compiler plugin artifacts
4444kotlinx.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
Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242
4343# set to true when building IDE compiler plugin artifacts
4444kotlinx.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
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import util.other.isPublicModule
66import util.other.libs
77import util.setupPage
88import util.tasks.*
9+ import java.io.OutputStream
910import java.nio.file.Path
1011import kotlin.io.path.*
1112
@@ -115,11 +116,9 @@ gradle.afterProject {
115116tasks.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 }
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242
4343# set to true when building IDE compiler plugin artifacts
4444kotlinx.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
Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242
4343# set to true when building IDE compiler plugin artifacts
4444kotlinx.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
Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ kotlinx.rpc.plugin.internalDevelopment=true
4242
4343# set to true when building IDE compiler plugin artifacts
4444kotlinx.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
You can’t perform that action at this time.
0 commit comments