MeteoGroup / jbrotli

The repo has been migrated to Bitbucket https://bitbucket.org/dtnse/jbrotli/src/master/ and archived
Apache License 2.0
93 stars 21 forks source link

Cannot install your repo via SBT #23

Open ditekunov opened 6 years ago

ditekunov commented 6 years ago

Sbt supports Maven projects installing, but I cannot install yours via

libraryDependencies += "org.meteogroup.jbrotli" % "jbrotli" % "0.5.0"

So it fails with "unresolved dependency: org.meteogroup.jbrotli#jbrotli;0.5.0: not found" exception

atk91 commented 6 years ago

This is happening because the only available version of jbrotli in bintray is 0.2.0

nha commented 6 years ago

see https://github.com/MeteoGroup/jbrotli/issues/11

nwtgck commented 6 years ago

Hi, @ditekunov This explanation may be helpful. https://github.com/guardian/play-brotli-filter

According to the repository above, build.sbt looks like the following.


...

// (from: https://github.com/guardian/play-brotli-filter)
resolvers += "JBrotli Bintray Repository" at "https://dl.bintray.com/nitram509/jbrotli/"

// For jbrotli native
// (from: https://github.com/guardian/play-brotli-filter)
val brotliNativeArtefact = {
  val osName = System.getProperty("os.name").toLowerCase
  val osArch = System.getProperty("os.arch").toLowerCase
  val family = if (osName.startsWith("linux")) {
    "linux"
  } else if (osName.startsWith("mac os x") || osName.startsWith("darwin")) {
    "darwin"
  } else {
    "win32"
  }

  val arch = if (family == "darwin") {
    "x86-amd64"
  } else if (osArch == "i386" || osArch == "i486" || osArch == "i586" || osArch == "i686") {
    "x86"
  } else if (osArch == "amd64" || osArch == "x86-64" || osArch == "x64") {
    "x86-amd64"
  } else if (family == "linux" && osArch.startsWith("arm")) {
    "arm32-vfp-hflt"
  }

  s"jbrotli-native-$family-$arch"
}

libraryDependencies ++= Seq(
  "org.meteogroup.jbrotli" % "jbrotli" % "0.5.0",
  "org.meteogroup.jbrotli" % brotliNativeArtefact % "0.5.0"
)