@@ -106,21 +106,27 @@ trait KotlinModule extends JavaModule { outer =>
106106 }
107107
108108 /**
109- * Flag to use the embeddable kotlin compiler.
109+ * Flag to enable the use the embeddable kotlin compiler.
110110 * This can be necessary to avoid classpath conflicts or ensure
111111 * compatibility to the used set of plugins.
112112 *
113+ * The difference between the standard compiler and the embedded compiler is,
114+ * that the embedded compiler comes as a dependency-free JAR.
115+ * All its dependencies are shaded and thus relocated to different package names.
116+ * This also affects the compiler API, since relocated types may surface in the API
117+ * but are not compatible to their non-relocated versions.
118+ *
113119 * See also https://discuss.kotlinlang.org/t/kotlin-compiler-embeddable-vs-kotlin-compiler/3196
114120 */
115- def kotlinCompilerEmbeddable : Task [Boolean ] = Task { false }
121+ def kotlinUseEmbeddableCompiler : Task [Boolean ] = Task { false }
116122
117123 /**
118124 * The Ivy/Coursier dependencies resembling the Kotlin compiler.
119125 *
120- * Default is derived from [[kotlinCompilerVersion ]] and [[kotlinCompilerEmbeddable ]].
126+ * Default is derived from [[kotlinCompilerVersion ]] and [[kotlinUseEmbeddableCompiler ]].
121127 */
122128 def kotlinCompilerIvyDeps : T [Seq [Dep ]] = Task {
123- val useEmbeddable = kotlinCompilerEmbeddable ()
129+ val useEmbeddable = kotlinUseEmbeddableCompiler ()
124130 val kv = kotlinCompilerVersion()
125131 val isOldKotlin = Seq (" 1.0." , " 1.1." , " 1.2.0" , " 1.2.1" , " 1.2.2" , " 1.2.3" , " 1.2.4" )
126132 .exists(prefix => kv.startsWith(prefix))
@@ -428,8 +434,8 @@ trait KotlinModule extends JavaModule { outer =>
428434 outer.kotlincOptions().filterNot(_.startsWith(" -Xcommon-sources" )) ++
429435 Seq (s " -Xfriend-paths= ${outer.compile().classes.path.toString()}" )
430436 }
431- override def kotlinCompilerEmbeddable : Task [Boolean ] =
432- Task .Anon { outer.kotlinCompilerEmbeddable () }
437+ override def kotlinUseEmbeddableCompiler : Task [Boolean ] =
438+ Task .Anon { outer.kotlinUseEmbeddableCompiler () }
433439 }
434440
435441}
0 commit comments