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

Cannot resolve correct version when not using scala 2.12 #393

Open
rbscgh opened this issue Jan 31, 2025 · 2 comments
Open

Cannot resolve correct version when not using scala 2.12 #393

rbscgh opened this issue Jan 31, 2025 · 2 comments

Comments

@rbscgh
Copy link

rbscgh commented Jan 31, 2025

This might be more a sbt issue than this plugin but when i explicitly set

addSbtPlugin("com.thesamet" % "sbt-protoc_2.12_1.0" % "1.0.7")

the resulting download is trying to look for
https://repo1.maven.org/maven2/com/thesamet/sbt-protoc_2.12_1.0_2.12_1.0/1.0.7/sbt-protoc_2.12_1.0-1.0.7.pom

im wanting to cross build my project with

lazy val scala212 = "2.12.18"
lazy val scala213 = "2.13.14"
lazy val scala3 = "3.3.4"

...
crossScalaVersions := Seq(scala212, scala213, scala3)

and changing versions with ++VERSION in sbt doesnt let me proceed with non 2.12 versions due to this issue.

Any idea ? or has anyone run into this as well ?

ive additionally tried

addSbtPlugin("com.thesamet" %% "sbt-protoc_2.12_1.0" % "1.0.7")
dependencyOverrides += {
  val sbtV = (pluginCrossBuild / sbtBinaryVersion).value
  val scalaV = "2.12"
  sbt.Defaults.sbtPluginExtra("com.thesamet" % "sbt-protoc" % "1.0.7", sbtV, scalaV)
}

but also no luck

@rbscgh
Copy link
Author

rbscgh commented Jan 31, 2025

heres a gist of my plugin and build sbt files

https://gist.github.com/rbscgh/16b8f1013fc3575cb608a752be6fbfbb

@thesamet
Copy link
Owner

SBT plugins are always on Scala 2.12. This doesn't limit you from cross-compiling the generated code for any Scala versions. There should be no need to change the scala version of the plugin explicity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants