charts
charts copied to clipboard
Unable to integrate this library in my Compose Desktop project
Hello,
I am looking for a library to display graphics in my Compose Desktop application. I came across yours, so I tried to integrate it as shown here.
But when I run the gradle runDistributable task, I get this error:
Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find com.github.tehras:charts:Tag.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/github/tehras/charts/Tag/charts-Tag.pom
- https://maven.pkg.jetbrains.space/public/p/compose/dev/com/github/tehras/charts/Tag/charts-Tag.pom
- https://jitpack.io/com/github/tehras/charts/Tag/charts-Tag.pom
- https://dl.google.com/dl/android/maven2/com/github/tehras/charts/Tag/charts-Tag.pom
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Here is my build.gradle.kts:
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.21"
id("org.jetbrains.compose") version "1.0.0-alpha4-build310"
}
group = "fr.genie23"
version = "1.0.0"
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://jitpack.io")
google()
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.21")
implementation(compose.desktop.currentOs)
implementation("com.github.tehras:charts:Tag")
implementation("org.apache.pdfbox:pdfbox:2.0.24")
implementation("org.apache.pdfbox:fontbox:2.0.24")
implementation("org.apache.pdfbox:jempbox:1.8.16")
implementation("org.apache.pdfbox:xmpbox:2.0.24")
implementation("org.apache.pdfbox:preflight:2.0.24")
implementation("org.apache.pdfbox:pdfbox-tools:2.0.24")
implementation("org.bouncycastle:bcprov-jdk15on:1.69")
implementation("org.bouncycastle:bcmail-jdk15on:1.69")
implementation("org.bouncycastle:bcpkix-jdk15on:1.69")
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
tasks.register<Copy>("copyRelease") {
group = "compose desktop"
description = "Copy release builded executable into out folder."
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(
"build/compose/binaries/main/deb",
"build/compose/binaries/main/dmg",
"build/compose/binaries/main/exe",
"build/compose/binaries/main/rpm"
)
into("out")
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
packageName = "Free CoManagement"
description = "Logiciel de fusion de documents PDF"
targetFormats(TargetFormat.Dmg, TargetFormat.Exe, TargetFormat.Deb, TargetFormat.Rpm)
windows {
iconFile.set(project.file("src/main/resources/icons/logo.64x64.ico"))
dirChooser = true
menuGroup = "Genie23.fr"
}
macOS {
iconFile.set(project.file("src/main/resources/icons/logo.64x64.icns"))
}
linux {
iconFile.set(project.file("src/main/resources/icons/logo.64x64.png"))
menuGroup = "Genie23.fr"
}
}
}
}
@Genie23 this is supporting desktop
@Genie23 change the line:
implementation("com.github.tehras:charts:Tag")
to
implementation("com.github.tehras:charts:0.2.2-alpha")
which is a current version