Skip to content

Commit

Permalink
only use major sjs version, changes as per review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
domizei385 committed Apr 28, 2021
1 parent e944e6d commit 5d298ed
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 21 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@ jobs:
java: [ '11' ]
scala: [
{ version: '2.12.13' },
{ version: '2.12.12' },
{ version: '2.12.11' },
{ version: '2.12.10' },
{ version: '2.13.5' },
{ version: '2.13.4' },
{ version: '2.13.3' },
{ version: '2.13.2' },
{ version: '2.13.1' },
{ version: '2.13.0' }
{ version: '2.12.10' }
]
steps:
- name: checkout the repo
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ discussion on scoverage.

Make sure your SBT version in project/build.properties:
```
sbt.version = 1.5.1
sbt.version = 1.2.8
```

Add the plugin in project/plugins.sbt:
Expand Down Expand Up @@ -52,7 +52,7 @@ Sample project with scoverage in both sbt and maven - [the scoverage samples pro

## Notes on upgrading to version 1.6.x
* ´coverageCleanSubprojectFiles´ key has been removed
* scala version 2.12+ is required as a minimum
* scala version 2.12+ is required as a minimum (due to scoverage suppport)

## Notes on upgrading to version 1.6.0

Expand Down
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ releaseProcess := Seq[ReleaseStep](
inquireVersions,
runClean,
releaseStepCommandAndRemaining("^ test"),
// releaseStepCommandAndRemaining("^ scripted"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("^ publish"),
releaseStepCommandAndRemaining("publishSigned"),
setNextVersion,
commitNextVersion,
pushChanges
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/scoverage/ScoverageSbtPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ object ScoverageSbtPlugin extends AutoPlugin {
private def optionalScalaJsSuffix(deps: Seq[ModuleID]): String = {
val sjsClassifier = deps.collectFirst {
case moduleId if moduleId.organization == "org.scala-js" && moduleId.name == "scalajs-library" => moduleId.revision
}.map(_.take(3)).map(sjsVersion => "_sjs" + sjsVersion)
}.map(_.take(1)).map(sjsVersion => "_sjs" + sjsVersion)

sjsClassifier getOrElse ""
}
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/scoverage/aggregate-only/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ val pluginVersion = sys.props.getOrElse(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin))

addSbtPlugin("org.scoverage" % "sbt-scoverage" % pluginVersion withCrossVersion(CrossVersion.full))
addSbtPlugin("org.scoverage" % "sbt-scoverage" % pluginVersion)

resolvers ++= {
if (pluginVersion.endsWith("-SNAPSHOT"))
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/scoverage/aggregate/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ val pluginVersion = sys.props.getOrElse(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin))

addSbtPlugin("org.scoverage" % "sbt-scoverage" % pluginVersion withCrossVersion(CrossVersion.full))
addSbtPlugin("org.scoverage" % "sbt-scoverage" % pluginVersion)

resolvers ++= {
if (pluginVersion.endsWith("-SNAPSHOT"))
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/scoverage/bad-coverage/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ val pluginVersion = sys.props.getOrElse(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin))

addSbtPlugin("org.scoverage" % "sbt-scoverage" % pluginVersion withCrossVersion(CrossVersion.full))
addSbtPlugin("org.scoverage" % "sbt-scoverage" % pluginVersion)

resolvers ++= {
if (pluginVersion.endsWith("-SNAPSHOT"))
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/scoverage/coverage-off/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ val pluginVersion = sys.props.getOrElse(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin))

addSbtPlugin("org.scoverage" % "sbt-scoverage" % pluginVersion withCrossVersion(CrossVersion.full))
addSbtPlugin("org.scoverage" % "sbt-scoverage" % pluginVersion)

resolvers ++= {
if (pluginVersion.endsWith("-SNAPSHOT"))
Expand Down
2 changes: 0 additions & 2 deletions src/sbt-test/scoverage/preserve-set/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ resolvers ++= {
else Seq.empty
}

// We force coverage to be always disabled for 2.10. This is not an uncommon real world scenario
coverageEnabled := {
CrossVersion.partialVersion(scalaVersion.value) match {
// case Some((2, 10)) => false
case _ => coverageEnabled.value
}
}
2 changes: 1 addition & 1 deletion src/sbt-test/scoverage/scalajs/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lazy val cross = CrossProject("sjstest", file("sjstest"))(JVMPlatform, JSPlatfor
.settings(
scalaVersion := "2.12.13",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.8" % "test" cross(CrossVersion.binary)
"org.scalatest" %% "scalatest" % "3.2.8" % "test"
)
)

Expand Down

0 comments on commit 5d298ed

Please sign in to comment.