File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 5
5
apply plugin : ' kotlin-dce-js'
6
6
apply from : rootProject. file(' gradle/node-js.gradle' )
7
7
8
+ // Workaround resolving new Gradle metadata with kotlin2js
9
+ // TODO: Remove once plugin is fixed
10
+ try {
11
+ def jsCompilerType = Class . forName(" org.jetbrains.kotlin.gradle.targets.js.JsCompilerType" )
12
+ def jsCompilerAttr = Attribute . of(" org.jetbrains.kotlin.js.compiler" , jsCompilerType)
13
+ project. dependencies. attributesSchema. attribute(jsCompilerAttr)
14
+ configurations {
15
+ matching {
16
+ it. name. endsWith(" Classpath" )
17
+ }. forEach {
18
+ it. attributes. attribute(jsCompilerAttr, jsCompilerType. legacy)
19
+ }
20
+ }
21
+ } catch (java.lang.ClassNotFoundException e) {
22
+ // org.jetbrains.kotlin.gradle.targets.js.JsCompilerType is missing in 1.3.x
23
+ // But 1.3.x doesn't generate Gradle metadata, so this workaround is not needed
24
+ }
25
+
8
26
dependencies {
9
27
compile " org.jetbrains.kotlinx:kotlinx-html-js:$html_version "
10
28
}
You can’t perform that action at this time.
0 commit comments