Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for compose-jb #59

Open
070hm opened this issue Nov 20, 2022 · 0 comments
Open

Add support for compose-jb #59

070hm opened this issue Nov 20, 2022 · 0 comments

Comments

@070hm
Copy link

070hm commented Nov 20, 2022

Thanks to all contributors for this library, which is very useful. If you can add support for compose-jb on the desktop, that will be nice.

When I added Charty dependence in desktop compose-jb.
implementation("com.himanshoe:charty:1.0.1")

showing this error
`Could not resolve all files for configuration ':runtimeClasspath'.

Could not resolve com.himanshoe:charty:1.0.1.
Required by:
project :
No matching variant of com.himanshoe:charty:1.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 18, packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
- Variant 'releaseVariantReleaseApiPublication' capability com.himanshoe:charty:1.0.1 declares a library, and its dependencies declared externally:
- Incompatible because this component declares an API of a component, with the library elements 'aar' and the consumer needed a runtime of a component, packaged as a jar
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 18)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')
- Variant 'releaseVariantReleaseRuntimePublication' capability com.himanshoe:charty:1.0.1 declares a runtime of a library, and its dependencies declared externally:
- Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, packaged as a jar
- Other compatible attributes:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 18)
- Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'jvm')`

My build.gradle.kts
`
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm")
id("org.jetbrains.compose")
}

repositories {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}

dependencies {
testImplementation(kotlin("test"))
implementation(compose.desktop.currentOs)
implementation("com.himanshoe:charty:1.0.1")
}

tasks.test {
useJUnitPlatform()
}

tasks.withType {
kotlinOptions.jvmTarget = JavaVersion.VERSION_18.toString()
}

compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
includeAllModules = true
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = projectName
packageVersion = projectVersion
}
}
}

`

@070hm 070hm changed the title Added support for compose-jb Add support for compose-jb Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant