-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feature: Support Scala Native * clean: Drop Scala 2.11 * fix: Install clang in CI * fix: Scalatest dependency to use Scala Native dep
- Loading branch information
Showing
16 changed files
with
37 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
val scala211 = "2.11.12" | ||
val scala212 = "2.12.10" | ||
val scala212 = "2.12.17" | ||
val scala213 = "2.13.10" | ||
val scala3 = "3.2.2" | ||
|
||
name := "codacy-plugins-api" | ||
organization := "com.codacy" | ||
|
||
scalaVersion := scala212 | ||
|
||
crossScalaVersions := Seq(scala211, scala212, scala213, scala3) | ||
|
||
libraryDependencies ++= Seq("wordspec", "shouldmatchers").map(m => "org.scalatest" %% s"scalatest-$m" % "3.2.14" % Test) | ||
|
||
Compile / unmanagedSourceDirectories += { | ||
val sourceDir = (sourceDirectory in Compile).value | ||
CrossVersion.partialVersion(scalaVersion.value) match { | ||
case Some((major, minor)) if major > 2 || minor >= 13 => | ||
sourceDir / "scala-2.13+" | ||
case _ => | ||
sourceDir / "scala-2.13-" | ||
} | ||
} | ||
|
||
pgpPassphrase := Option(System.getenv("SONATYPE_GPG_PASSPHRASE")).map(_.toCharArray) | ||
|
||
description := "A dependency free api for Codacy Tools" | ||
|
||
scmInfo := Some( | ||
ScmInfo(url("https://github.com/codacy/codacy-plugins-api"), "scm:git:git@github.com:codacy/codacy-plugins-api.git")) | ||
|
||
publicMvnPublish | ||
ThisBuild / scalaVersion := scala212 | ||
ThisBuild / crossScalaVersions := Seq(scala212, scala213, scala3) | ||
|
||
lazy val `codacy-plugins-api` = | ||
crossProject(JVMPlatform, NativePlatform) | ||
.crossType(CrossType.Pure) | ||
.settings(name := "codacy-plugins-api", | ||
organization := "com.codacy", | ||
libraryDependencies ++= Seq("wordspec", "shouldmatchers").map(m => | ||
"org.scalatest" %%% s"scalatest-$m" % "3.2.14" % Test), | ||
Compile / unmanagedSourceDirectories += { | ||
val sourceDir = (ThisBuild / baseDirectory).value / name.value / "src" / "main" | ||
CrossVersion.partialVersion(scalaVersion.value) match { | ||
case Some((major, minor)) if major > 2 || minor >= 13 => | ||
sourceDir / "scala-2.13+" | ||
case _ => | ||
sourceDir / "scala-2.13-" | ||
} | ||
}, | ||
pgpPassphrase := Option(System.getenv("SONATYPE_GPG_PASSPHRASE")).map(_.toCharArray), | ||
description := "A dependency free api for Codacy Tools", | ||
scmInfo := Some( | ||
ScmInfo(url("https://github.com/codacy/codacy-plugins-api"), | ||
"scm:git:git@github.com:codacy/codacy-plugins-api.git")), | ||
publicMvnPublish) | ||
|
||
lazy val root = | ||
project | ||
.in(file(".")) | ||
.settings(publish / skip := true) | ||
.aggregate(`codacy-plugins-api`.jvm, `codacy-plugins-api`.native) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
addSbtPlugin("com.codacy" % "codacy-sbt-plugin" % "25.1.1") | ||
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.12") | ||
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.1") |