ajalt / colormath

Multiplatform Kotlin color conversion and manipulation
https://ajalt.github.io/colormath/
MIT License
308 stars 21 forks source link

Enable the new IR compiler backend for JS artifacts. #14

Closed sureshg closed 3 years ago

sureshg commented 3 years ago

Right now colormath (implementation("com.github.ajalt.colormath:colormath:2.0.0")) library can't use in Kotlin/JS (kotlin("js") version "1.5.0-RC") project, which throws the following error on compilation.

  > Could not resolve com.github.ajalt.colormath:colormath:2.0.0.
     Required by:
         project :
      > No matching variant of com.github.ajalt.colormath:colormath:2.0.0 was found. The consumer was configured to find a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js', attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir' but:

More info: https://kotlinlang.org/docs/js-ir-compiler.html#65018c1b

ajalt commented 3 years ago

I'll add IR artifacts to the next version. In the meantime, you may be able to configure your project to use the LEGACY compiler with js(LEGACY) if you don't have any IR-only dependencies.

sureshg commented 3 years ago

Thanks! Yeah, I will wait for the next version as I do have a few IR-only dependencies in my kotlin/js app.

ajalt commented 3 years ago

@sureshg FYI version 2.1.0 has been released with JS IR support