kavedaa / sbt-javafx

JavaFX plugin for SBT
36 stars 6 forks source link

Problem: not sure how to add plugin to SBT's `enablePlugins(...)` #23

Open kevinmeredith opened 7 years ago

kevinmeredith commented 7 years ago
$cat project/plugins.sbt
addSbtPlugin("no.vedaadata" %% "sbt-javafx" % "0.7")

$cat build.sbt
scalaVersion := "2.12.1"

lazy val root  = (project in file(".")).
  enablePlugins(no.vedaadata.sbtjavafx.JavaFXPlugin).
  settings(
    name := "test-javafx-app"
  )

$sbt
[info] Loading project definition from /home/kmeredith/src/javafx_plugin/project
/home/kmeredith/src/javafx_plugin/build.sbt:4: error: type mismatch;
 found   : no.vedaadata.sbtjavafx.JavaFXPlugin.type
 required: sbt.Plugins
  enablePlugins(no.vedaadata.sbtjavafx.JavaFXPlugin).
                                       ^
sbt.compiler.EvalException: Type error in expression
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

How can I add this plugin to the enablePlugins method?

kavedaa commented 7 years ago

Hi. You shouldn't use the enablePlugins method. See the examples for how to use the plugin.