ajalt / colormath

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

Module classpath missing #28

Closed vinsg closed 2 years ago

vinsg commented 2 years ago

Bug Report

Importing the library on a project running KMM version 1.7.10 causes the Task compileCommonMainKotlinMetadata to fail.

According to Kotlin docs projects running Kotlin v1.6.20 come with a hierarchical project structure. I suspect this causes compatibility issues with newer projects.

Versions

kotlin("multiplatform") version "1.7.10"
implementation("com.github.ajalt.mordant:mordant:2.0.0-beta7") // pulls colormath:3.2.0

Error

Cannot access 'com.github.ajalt.colormath.Color' which is a supertype of 'com.github.ajalt.mordant.rendering.TextColors'. Check your module classpath for missing or conflicting dependencies

Possible solution

Temporary fix for newer projects

Temporary disable the compileCommonMainKotlinMetadata task directly in your build.gradle.kts

tasks.matching { it.name == "compileCommonMainKotlinMetadata" }.all {
    enabled = false
}