diff --git a/bin/buildAll.sh b/bin/buildAll.sh index 5ab73e4..de1a536 100755 --- a/bin/buildAll.sh +++ b/bin/buildAll.sh @@ -8,4 +8,4 @@ cp src/native/lib/libsass.so src/main/resources/linux-x86/libsass.so ./bin/docker/buildLinux/x86/dockcross make -C src/native/ clean docker run --rm -v $(pwd)/bin/docker/buildLinux/x86-64/:/Compile -v $(pwd):/sass libsass/linux:1 -docker run --rm -v $(pwd)/bin/docker/buildDarwin:/Compile -v $(pwd):/sass libsass/darwin:1 +docker run --rm -v $(pwd)/bin/docker/buildDarwin-x86-64:/Compile -v $(pwd):/sass libsass/darwin-x86-64:1 diff --git a/bin/docker/buildDarwin-aarch64/readme.md b/bin/docker/buildDarwin-aarch64/readme.md new file mode 100644 index 0000000..59f8bb9 --- /dev/null +++ b/bin/docker/buildDarwin-aarch64/readme.md @@ -0,0 +1 @@ +Needs something to compile libsaas on `arm64` arch. \ No newline at end of file diff --git a/bin/docker/buildDarwin/Dockerfile b/bin/docker/buildDarwin-x86-64/Dockerfile similarity index 100% rename from bin/docker/buildDarwin/Dockerfile rename to bin/docker/buildDarwin-x86-64/Dockerfile diff --git a/bin/docker/buildDarwin/make.sh b/bin/docker/buildDarwin-x86-64/make.sh similarity index 82% rename from bin/docker/buildDarwin/make.sh rename to bin/docker/buildDarwin-x86-64/make.sh index 0f05f0a..96698e5 100755 --- a/bin/docker/buildDarwin/make.sh +++ b/bin/docker/buildDarwin-x86-64/make.sh @@ -2,7 +2,9 @@ cd /sass rm -r src/main/resources/darwin +rm -r src/main/resources/darwin-x86-64 mkdir -p src/main/resources/darwin +mkdir -p src/main/resources/darwin-x86-64 # *** Build libsass make -C src/native clean @@ -21,6 +23,7 @@ BUILD=shared \ # *** Copy to target location. Note that the makefile from libsass will output a .so file. Renaming it to .dylib is good enough. cp src/native/lib/libsass.so src/main/resources/darwin/libsass.dylib || exit 1 +cp src/native/lib/libsass.so src/main/resources/darwin-x86-64/libsass.dylib || exit 1 # *** Cleanup cd /sass/src/native diff --git a/build.sbt b/build.sbt index d1580e7..23dd1a5 100644 --- a/build.sbt +++ b/build.sbt @@ -16,8 +16,10 @@ javaOptions += "-Djna.nosys=true" addSbtPlugin("com.typesafe.sbt" % "sbt-web" % "1.4.4") libraryDependencies ++= Seq( - "org.scalatest" %% "scalatest" % "3.0.5" % "test", - "net.java.dev.jna" % "jna" % "5.5.0" + "org.scalatest" %% "scalatest" % "3.2.11" % "test", + "org.scalatest" %% "scalatest-mustmatchers" % "3.2.11" % "test", + "org.scalatest" %% "scalatest-funspec" % "3.2.11" % "test", + "net.java.dev.jna" % "jna" % "5.10.0" ) // Compiler settings @@ -32,7 +34,7 @@ scalacOptions ++= Seq( "-encoding", "UTF-8" ) -javacOptions ++= Seq("-source", "1.7", "-target", "1.7", "-Xlint") +javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint") // Bintray settings bintrayOrganization in bintray := None diff --git a/project/build.properties b/project/build.properties index 797e7cc..c8fcab5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.10 +sbt.version=1.6.2 diff --git a/project/plugins.sbt b/project/plugins.sbt index 849ba44..b35ee93 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -12,4 +12,6 @@ addSbtPlugin("de.heikoseeberger" % "sbt-header" % "3.0.1") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") +addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3") + addCompilerPlugin("org.psywerx.hairyfotr" %% "linter" % "0.1.17") diff --git a/src/main/resources/darwin-aarch64/libsass.dylib b/src/main/resources/darwin-aarch64/libsass.dylib new file mode 100644 index 0000000..7a613af Binary files /dev/null and b/src/main/resources/darwin-aarch64/libsass.dylib differ diff --git a/src/main/resources/darwin-x86-64/libsass.dylib b/src/main/resources/darwin-x86-64/libsass.dylib new file mode 100755 index 0000000..70f2db5 Binary files /dev/null and b/src/main/resources/darwin-x86-64/libsass.dylib differ diff --git a/src/test/scala/org/irundaia/sass/SassCompilerTest.scala b/src/test/scala/org/irundaia/sass/SassCompilerTest.scala index da1b0e1..3766a0c 100644 --- a/src/test/scala/org/irundaia/sass/SassCompilerTest.scala +++ b/src/test/scala/org/irundaia/sass/SassCompilerTest.scala @@ -18,11 +18,12 @@ package org.irundaia.sass import java.nio.file.{Paths, Files} -import org.scalatest.{FunSpec, MustMatchers} +import org.scalatest.funspec.AnyFunSpec; +import org.scalatest.matchers.must._; import scala.io.Source -class SassCompilerTest extends FunSpec with MustMatchers { +class SassCompilerTest extends AnyFunSpec with Matchers { val testDir = Files.createTempDirectory("sbt-sassify") val compilerSettings = CompilerSettings(Minified, true, true, Auto, Seq(), "", 10, "css")