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

Play Application cross-compilation not working #35

Open
aberman opened this issue Nov 13, 2020 · 1 comment
Open

Play Application cross-compilation not working #35

aberman opened this issue Nov 13, 2020 · 1 comment

Comments

@aberman
Copy link

aberman commented Nov 13, 2020

Hello,

I currently have a simple Play application I want to cross-compile between two different Scala versions. The app is set up with the standard Play directory structure with app, conf, and public. When I run a dist I see the two directories built, jvm-2.11 and jvm-2.12, but the jars that are built are empty, which seems to imply the Play plugin is not being used for building. I'm not sure if I've done something wrong in my build or if this is an unresolved issue in this project.

Here's my build.sbt:

ThisBuild / organization := "com.foo"
ThisBuild / scalaVersion := "2.12.12"
ThisBuild / version := "rev1"

lazy val play = (projectMatrix in file("."))
  .enablePlugins(PlayScala)
  .settings(
    name := "play-2.6",
    libraryDependencies ++= Seq(
      guice
    ),
    scalacOptions ++= Seq(
      "-feature",
      "-encoding", "utf8",
      "-deprecation",
      "-Xfatal-warnings"
    ))
 .jvmPlatform(scalaVersions = Seq("2.12.12", "2.11.12"))

Thanks!

@psuszyns
Copy link

psuszyns commented Jul 22, 2022

I also have problems with sbt-projectmatrix in a Play application with submodules. For me, the jars created do contain the classes but they lack the application.conf and other files from the resources directory, which for Play applications is /conf, not /src/main/resources

I'm using sbt plugins:
"com.typesafe.play" % "sbt-plugin" % "2.6.15"
"com.eed3si9n" % "sbt-projectmatrix" % "0.8.0"

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