File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -225,3 +225,23 @@ task testsJar(type: Jar, dependsOn: jvmTestClasses) {
225
225
artifacts {
226
226
archives testsJar
227
227
}
228
+
229
+ // KT-37264 Workaround for metadata compilation problem (provide an empty metadata instead)
230
+ afterEvaluate {
231
+ def emptySrcDir = new File (buildDir, " tmp/emptySrc" )
232
+ emptySrcDir. mkdirs()
233
+ def emptySrcFile = new File (emptySrcDir, " EmptyKtFile.kt" )
234
+ emptySrcFile. createNewFile()
235
+ def emptySrcDirs = project. objects. sourceDirectorySet(" emptySrc" , " empty sources for Kotlin common compilations" )
236
+ emptySrcDirs. srcDir(emptySrcDir)
237
+ tasks. matching { it. name == " compileConcurrentMainKotlinMetadata" }. all {
238
+ doFirst {
239
+ emptySrcFile. text = " package kotlinx.coroutines"
240
+ source = fileTree(emptySrcDir)
241
+ }
242
+ }
243
+ kotlin. metadata { }. compilations. matching { it. name in [" nativeMain" , " nativeDarwinMain" , " nativeOtherMain" ] }. all {
244
+ it. getAllSources$kotlin_gradle_plugin(). clear()
245
+ it. getAllSources$kotlin_gradle_plugin(). add(emptySrcDirs)
246
+ }
247
+ }
You can’t perform that action at this time.
0 commit comments