Cross-compiling aggregate projects with different crossScalaVersions for subprojects

前端 未结 2 1632
日久生厌
日久生厌 2020-12-21 04:27

We have a project with several subprojects which can compile under both Scala 2.10 and 2.11, one subproject which only compiles under 2.10 (actually, Scala-Virtualized 2.10.

2条回答
  •  一生所求
    2020-12-21 04:47

    I had a similar question. My question had an additional complication of classpath dependencies (dependsOn), rather than just aggregation, but one solution for my problem fixes this one quite well.

    sbt-doge, a deceptively cutesy GitHub project, replaces the implementation of + with one of its interchangeable prefixes: much, so, such, very.

    Current implementation of + cross building operator does not take in account for the crossScalaVersions of the sub projects. Until that's fixed, here's an alternative implementation of it.

    The creator of the project is one of the main contributors to SBT.


    Add

    addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.3")
    

    to project/plugins.sbt.

    Then

    > very compile
    

提交回复
热议问题