Skip to content

Add transitive compiler plugin classpath workaround #23

@kyay10

Description

@kyay10

The workaround for KT-53477 (which applies to not just Native compilation) should be added by default to the Gradle plugin. This makes it possible to add dependencies to the compiler plugin, and not be surprised when they're inaccessible after release. The workaround can eventually be removed when the issue is resolved.
I've added in the gradle plugin like so (will open a PR soon):

override fun applyToCompilation(
  kotlinCompilation: KotlinCompilation<*>
): Provider<List<SubpluginOption>> {
  val project = kotlinCompilation.target.project
  // KT-53477 workaround
  project.configurations.matching {
    it.name.startsWith("kotlin") && it.name.contains("CompilerPluginClasspath")
  }.all {
    it.isTransitive = true
  }
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions