If I needed to use the stable release version, I would have my project/plugins.sbt as below:
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0")
I am trying to use a specific version (a PR to be precise) of ScalaNative for my project.
Here is my build.sbt
scalaVersion := "2.13.4"
// Set to false or remove if you want to show stubs as linking errors
nativeLinkStubs := true
enablePlugins(ScalaNativePlugin)
And this is my project/plugins.sbt
lazy val root = (project in file(".")).dependsOn(scalaNativePlugin)
lazy val scalaNativePlugin = RootProject(uri("https://github.com/scala-native/scala-native.git#v0.4.0"))
When I run sbt it fails with the following error log.
[info] welcome to sbt 1.4.6 (Oracle Corporation Java 1.8.0_292)
[info] loading global plugins from /home/sadique/.sbt/1.0/plugins
[info] loading settings for project root from plugins.sbt ...
[info] loading settings for project scala-native-build from build.sbt ...
[info] loading project definition from /home/sadique/.sbt/1.0/staging/5c4ed83a83573e9369a0/scala-native/project
[info] loading settings for project scala-native from build.sbt ...
[info] resolving key references (24414 settings) ...
[info] loading project definition from /home/sadique/Programming/scala/scala-native-template/sn-test-custom/project
/home/sadique/Programming/scala/scala-native-template/sn-test-custom/build.sbt:6: error: not found: value ScalaNativePlugin
enablePlugins(ScalaNativePlugin)
^
[error] Type error in expression
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
I have tried with both capital and small S in scalaNativePlugin
for the variable name in plugins.sbt.
What am I doing wrong? What is the correct way to do this?