Skip to content

Commit

Permalink
fix: remove unused javafx + scalafmt dependencies from jar
Browse files Browse the repository at this point in the history
  • Loading branch information
mirko-felice committed Feb 27, 2023
1 parent 29e7288 commit ee00a0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions chess/build.gradle.kts
Expand Up @@ -16,12 +16,12 @@ repositories { mavenCentral() }

dependencies {
implementation(libs.scala)
implementation(libs.bundles.scalafmt)
compileOnly(libs.bundles.scalafmt)
implementation(libs.vertx)
implementation(libs.scalafx)
libs.bundles.javafx.get().forEach {
val fxArtifact = "${it.module}:${it.version}"
implementation("$fxArtifact:${JavaFX.getSpecificClassifier()}")
compileOnly("$fxArtifact:${JavaFX.getSpecificClassifier()}")
JavaFX.getClassifiers().forEach { runtimeOnly("$fxArtifact:$it") } // Multiplatform Jar
}
implementation(libs.tuprolog)
Expand Down
Expand Up @@ -12,5 +12,5 @@ package io.github.chess.viewcontroller.fxcomponents
* JavaFX.
*/
trait FXComponent:
export scalafx.Includes.*
export scalafx.scene.SceneIncludes.*
export io.github.chess.viewcontroller.fxutils.FXUtils.*
4 changes: 1 addition & 3 deletions gradle/libs.versions.toml
Expand Up @@ -24,14 +24,12 @@ javafx-controls = { module = "org.openjfx:javafx-controls", version.ref = "javaf
javafx-fxml = { module = "org.openjfx:javafx-fxml", version.ref = "javafx-version" }
javafx-graphics = { module = "org.openjfx:javafx-graphics", version.ref = "javafx-version" }
javafx-media = { module = "org.openjfx:javafx-media", version.ref = "javafx-version" }
javafx-swing = { module = "org.openjfx:javafx-swing", version.ref = "javafx-version" }
javafx-web = { module = "org.openjfx:javafx-web", version.ref = "javafx-version" }
tuprolog = { module = "it.unibo.alice.tuprolog:2p-core", version.ref = "tuprolog-version" }
# insert the dependencies here...

[bundles]
scalafmt = [ "scalafmt-cli", "scalafmt-config" ]
javafx = [ "javafx-base", "javafx-controls", "javafx-fxml", "javafx-graphics", "javafx-media", "javafx-swing", "javafx-web" ]
javafx = [ "javafx-base", "javafx-controls", "javafx-fxml", "javafx-graphics", "javafx-media" ]
# insert groups of dependencies here...

[plugins]
Expand Down

0 comments on commit ee00a0b

Please sign in to comment.