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

Minimize ditches kotlinx.coroutines Dispatchers.Main JavaFx implementation #442

Open
LouisCAD opened this issue Dec 20, 2018 · 0 comments
Open
Labels

Comments

@LouisCAD
Copy link
Member

Shadow Version

4.0.3

Gradle Version

4.10.1-all

Expected Behavior

Dispatchers.Main from kotlinx.coroutines populated by JavaFx artifact can be used without any issue.

Actual Behavior

Crash when using Dispatchers.Main because the implementation has been removed, so the ServiceLoader doesn't find it.

Gradle Build Script(s)

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") // Version 1.3.11 defined in root build.gradle file
    application
    id("com.github.johnrengelman.shadow") version "4.0.3"
}

tasks.named<ShadowJar>("shadowJar") {
    minimize()
}

dependencies {
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-javafx:1.1.0-alpha")
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "1.8"
}

application {
    mainClassName = "com.example.MyApp"
}

java {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

The resource file, the referenced class, or both are removed when minimize is enabled, but it shouldn't.

@Goooler Goooler added the bug label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants