|
1 | | -val scala211 = "2.11.12" |
2 | | -val scala212 = "2.12.10" |
| 1 | +val scala212 = "2.12.17" |
3 | 2 | val scala213 = "2.13.10" |
4 | 3 | val scala3 = "3.2.2" |
5 | 4 |
|
6 | | -name := "codacy-plugins-api" |
7 | | -organization := "com.codacy" |
8 | | - |
9 | | -scalaVersion := scala212 |
10 | | - |
11 | | -crossScalaVersions := Seq(scala211, scala212, scala213, scala3) |
12 | | - |
13 | | -libraryDependencies ++= Seq("wordspec", "shouldmatchers").map(m => "org.scalatest" %% s"scalatest-$m" % "3.2.14" % Test) |
14 | | - |
15 | | -Compile / unmanagedSourceDirectories += { |
16 | | - val sourceDir = (sourceDirectory in Compile).value |
17 | | - CrossVersion.partialVersion(scalaVersion.value) match { |
18 | | - case Some((major, minor)) if major > 2 || minor >= 13 => |
19 | | - sourceDir / "scala-2.13+" |
20 | | - case _ => |
21 | | - sourceDir / "scala-2.13-" |
22 | | - } |
23 | | -} |
24 | | - |
25 | | -pgpPassphrase := Option(System.getenv("SONATYPE_GPG_PASSPHRASE")).map(_.toCharArray) |
26 | | - |
27 | | -description := "A dependency free api for Codacy Tools" |
28 | | - |
29 | | -scmInfo := Some( |
30 | | - ScmInfo(url("https://github.com/codacy/codacy-plugins-api"), "scm:git:git@github.com:codacy/codacy-plugins-api.git")) |
31 | | - |
32 | | -publicMvnPublish |
| 5 | +ThisBuild / scalaVersion := scala212 |
| 6 | +ThisBuild / crossScalaVersions := Seq(scala212, scala213, scala3) |
| 7 | + |
| 8 | +lazy val `codacy-plugins-api` = |
| 9 | + crossProject(JVMPlatform, NativePlatform) |
| 10 | + .crossType(CrossType.Pure) |
| 11 | + .settings(name := "codacy-plugins-api", |
| 12 | + organization := "com.codacy", |
| 13 | + libraryDependencies ++= Seq("wordspec", "shouldmatchers").map(m => |
| 14 | + "org.scalatest" %%% s"scalatest-$m" % "3.2.14" % Test), |
| 15 | + Compile / unmanagedSourceDirectories += { |
| 16 | + val sourceDir = (ThisBuild / baseDirectory).value / name.value / "src" / "main" |
| 17 | + CrossVersion.partialVersion(scalaVersion.value) match { |
| 18 | + case Some((major, minor)) if major > 2 || minor >= 13 => |
| 19 | + sourceDir / "scala-2.13+" |
| 20 | + case _ => |
| 21 | + sourceDir / "scala-2.13-" |
| 22 | + } |
| 23 | + }, |
| 24 | + pgpPassphrase := Option(System.getenv("SONATYPE_GPG_PASSPHRASE")).map(_.toCharArray), |
| 25 | + description := "A dependency free api for Codacy Tools", |
| 26 | + scmInfo := Some( |
| 27 | + ScmInfo(url("https://github.com/codacy/codacy-plugins-api"), |
| 28 | + "scm:git:git@github.com:codacy/codacy-plugins-api.git")), |
| 29 | + publicMvnPublish) |
| 30 | + |
| 31 | +lazy val root = |
| 32 | + project |
| 33 | + .in(file(".")) |
| 34 | + .settings(publish / skip := true) |
| 35 | + .aggregate(`codacy-plugins-api`.jvm, `codacy-plugins-api`.native) |
0 commit comments