From 76415984267d4a1ca07263c1819970b92a49e1a8 Mon Sep 17 00:00:00 2001 From: Jose Emilio Labra Gayo Date: Wed, 10 Jul 2024 10:29:55 +0200 Subject: [PATCH] First attempt to make it compile --- .scalafmt.conf | 2 + build.sbt | 116 ++++++++++++++++------------- project/build.properties | 2 +- project/metals.sbt | 2 +- project/plugins.sbt | 26 ++++--- project/project/metals.sbt | 2 +- project/project/project/metals.sbt | 2 +- 7 files changed, 86 insertions(+), 66 deletions(-) create mode 100644 .scalafmt.conf diff --git a/.scalafmt.conf b/.scalafmt.conf new file mode 100644 index 0000000..ee7753a --- /dev/null +++ b/.scalafmt.conf @@ -0,0 +1,2 @@ +version = "3.7.15" +runner.dialect = scala213 \ No newline at end of file diff --git a/build.sbt b/build.sbt index 9810298..ff08104 100644 --- a/build.sbt +++ b/build.sbt @@ -1,29 +1,28 @@ -lazy val scala212 = "2.12.17" +lazy val scala212 = "2.12.19" lazy val scala213 = "2.13.10" -lazy val scala3 = "3.2.1" +lazy val scala3 = "3.2.1" lazy val supportedScalaVersions = List( scala3, - scala213, + scala213, scala212 ) val Java11 = JavaSpec.temurin("11") // "adopt@1.11" -lazy val srdfVersion = "0.1.125" -lazy val shaclexVersion = "0.2.4" -lazy val shaclsVersion = "0.1.83" -lazy val shexsVersion = "0.2.33" +lazy val srdfVersion = "0.1.125" +lazy val shaclexVersion = "0.2.4" +lazy val shaclsVersion = "0.1.83" +lazy val shexsVersion = "0.2.33" // Dependency versions -lazy val munitVersion = "0.7.29" -lazy val munitEffectVersion = "1.0.7" - -lazy val plantumlVersion = "1.2017.12" -lazy val logbackVersion = "1.2.11" -lazy val loggingVersion = "3.9.4" -lazy val scallopVersion = "4.1.0" +lazy val munitVersion = "0.7.29" +lazy val munitEffectVersion = "1.0.7" +lazy val plantumlVersion = "1.2017.12" +lazy val logbackVersion = "1.2.11" +lazy val loggingVersion = "3.9.4" +lazy val scallopVersion = "4.1.0" // Compiler plugin dependency versions // lazy val simulacrumVersion = "0.19.0" @@ -32,25 +31,26 @@ lazy val scallopVersion = "4.1.0" // Dependency modules // lazy val logbackClassic = "ch.qos.logback" % "logback-classic" % logbackVersion -lazy val munit = "org.scalameta" %% "munit" % munitVersion -lazy val munitEffect = "org.typelevel" %% "munit-cats-effect-3" % munitEffectVersion - -lazy val plantuml = "net.sourceforge.plantuml" % "plantuml" % plantumlVersion -lazy val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % loggingVersion -lazy val scallop = "org.rogach" %% "scallop" % scallopVersion +lazy val munit = "org.scalameta" %% "munit" % munitVersion +lazy val munitEffect = + "org.typelevel" %% "munit-cats-effect-3" % munitEffectVersion + +lazy val plantuml = "net.sourceforge.plantuml" % "plantuml" % plantumlVersion +lazy val scalaLogging = + "com.typesafe.scala-logging" %% "scala-logging" % loggingVersion +lazy val scallop = "org.rogach" %% "scallop" % scallopVersion // lazy val scalactic = "org.scalactic" %% "scalactic" % scalacticVersion // lazy val scalaTest = "org.scalatest" %% "scalatest" % scalaTestVersion -lazy val shex = "es.weso" %% "shex" % shexsVersion -lazy val shacl = "es.weso" %% "shacl" % shaclsVersion -lazy val schema = "es.weso" %% "schema" % shaclexVersion -lazy val schemaInfer = "es.weso" %% "schemainfer" % shaclexVersion -lazy val sgraph = "es.weso" %% "sgraph" % shaclexVersion -lazy val srdfJena = "es.weso" %% "srdfjena" % srdfVersion -lazy val utilsTest = "es.weso" %% "utilstest" % shaclexVersion +lazy val shex = "es.weso" %% "shex" % shexsVersion +lazy val shacl = "es.weso" %% "shacl" % shaclsVersion +lazy val schema = "es.weso" %% "schema" % shaclexVersion +lazy val schemaInfer = "es.weso" %% "schemainfer" % shaclexVersion +lazy val sgraph = "es.weso" %% "sgraph" % shaclexVersion +lazy val srdfJena = "es.weso" %% "srdfjena" % srdfVersion +lazy val utilsTest = "es.weso" %% "utilstest" % shaclexVersion lazy val MUnitFramework = new TestFramework("munit.Framework") - // Compiler plugin modules // lazy val simulacrum = "com.github.mpilquist" %% "simulacrum" % simulacrumVersion @@ -58,23 +58,31 @@ ThisBuild / githubWorkflowJavaVersions := Seq(Java11) lazy val umlShaclex = project .in(file(".")) - .enablePlugins(ScalaUnidocPlugin, - SiteScaladocPlugin, - AsciidoctorPlugin, - SbtNativePackager, - WindowsPlugin, - JavaAppPackaging - ) + .enablePlugins( + ScalaUnidocPlugin, + SiteScaladocPlugin, + AsciidoctorPlugin, + SbtNativePackager, + WindowsPlugin, + JavaAppPackaging + ) // .settings( // buildInfoKeys := BuildInfoKey.ofN(name, version, scalaVersion, sbtVersion), // buildInfoPackage := "es.weso.shaclex.buildinfo" // ) .settings(commonSettings, publishSettings) .settings( - unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(noDocProjects: _*), + unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects( + noDocProjects: _* + ), siteSubdirName in ScalaUnidoc := "scaladoc/latest", - addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), siteSubdirName in ScalaUnidoc), - unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(noDocProjects: _*), + addMappingsToSiteDir( + mappings in (ScalaUnidoc, packageDoc), + siteSubdirName in ScalaUnidoc + ), + unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects( + noDocProjects: _* + ), mappings in makeSite ++= Seq( file("src/assets/favicon.ico") -> "favicon.ico" ), @@ -91,9 +99,9 @@ lazy val umlShaclex = project srdfJena ), testFrameworks += MUnitFramework, - cancelable in Global := true, - fork := true, - crossScalaVersions := supportedScalaVersions, + cancelable in Global := true, + fork := true, + crossScalaVersions := supportedScalaVersions // crossScalaVersions := Nil, // publish / skip := true ) @@ -156,17 +164,23 @@ lazy val commonSettings = compilationSettings ++ sharedDependencies ++ Seq( lazy val publishSettings = Seq( sonatypeProfileName := ("es.weso"), - homepage := Some(url("https://github.com/labra/umlShaclex")), - licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")), - scmInfo := Some(ScmInfo(url("https://github.com/labra/umlShaclex"), "scm:git:git@github.com:labra/umlShaclex.git")), + homepage := Some(url("https://github.com/labra/umlShaclex")), + licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")), + scmInfo := Some( + ScmInfo( + url("https://github.com/labra/umlShaclex"), + "scm:git:git@github.com:labra/umlShaclex.git" + ) + ), autoAPIMappings := true, - apiURL := Some(url("http://labra.github.io/umlShaclex/latest/api/")), + apiURL := Some(url("http://labra.github.io/umlShaclex/latest/api/")), developers := List( Developer( - id="labra", - name="Jose Emilio Labra Gayo", - email="jelabra@gmail.com", - url=url("https://weso.labra.es") - )), - publishMavenStyle := true, + id = "labra", + name = "Jose Emilio Labra Gayo", + email = "jelabra@gmail.com", + url = url("https://weso.labra.es") + ) + ), + publishMavenStyle := true ) diff --git a/project/build.properties b/project/build.properties index 8b9a0b0..ee4c672 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.0 +sbt.version=1.10.1 diff --git a/project/metals.sbt b/project/metals.sbt index aaf3382..ac57eb4 100644 --- a/project/metals.sbt +++ b/project/metals.sbt @@ -3,6 +3,6 @@ // This file enables sbt-bloop to create bloop config files. -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.17") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.18") // format: on diff --git a/project/plugins.sbt b/project/plugins.sbt index f339c32..083c803 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,11 +1,15 @@ -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2") -addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1") -addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9") -addSbtPlugin("org.lyranthe.sbt" % "partial-unification" % "1.1.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0") -addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1") +addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") +addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") +addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2") +addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1") +addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.0") +addSbtPlugin("org.lyranthe.sbt" % "partial-unification" % "1.1.2") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0") +addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1") + +ThisBuild / libraryDependencySchemes ++= Seq( + "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always +) diff --git a/project/project/metals.sbt b/project/project/metals.sbt index aaf3382..ac57eb4 100644 --- a/project/project/metals.sbt +++ b/project/project/metals.sbt @@ -3,6 +3,6 @@ // This file enables sbt-bloop to create bloop config files. -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.17") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.18") // format: on diff --git a/project/project/project/metals.sbt b/project/project/project/metals.sbt index aaf3382..ac57eb4 100644 --- a/project/project/project/metals.sbt +++ b/project/project/project/metals.sbt @@ -3,6 +3,6 @@ // This file enables sbt-bloop to create bloop config files. -addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.17") +addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.18") // format: on