From 696b20651a1e6cb31b4b6d29444e6374e8519e1f Mon Sep 17 00:00:00 2001 From: djice Date: Fri, 26 Feb 2021 14:51:49 +0100 Subject: [PATCH] Initial commit --- .github/workflows/release.yml | 20 ++++++++++++ build.sbt | 31 +++++++++++++++++-- project/plugins.sbt | 2 +- project/scripted.sbt | 2 +- .../com/typesafe/sbt/unzip/UnzipPlugin.scala | 2 -- version.sbt | 1 - 6 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 version.sbt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1b5ace8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Release +on: + push: + branches: [master, main] + tags: ["*"] +jobs: + publish: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - uses: olafurpg/setup-scala@v10 + - uses: olafurpg/setup-gpg@v3 + - run: sbt ci-release + env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} \ No newline at end of file diff --git a/build.sbt b/build.sbt index 42f3ce0..e55f4ec 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,31 @@ -organization := "io.github.djice" +import sbt.util + +logLevel := util.Level.Debug + name := "sbt-unzip" description := "Unzip dependencies" -enablePlugins(JavaAppPackaging) enablePlugins(SbtPlugin) -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.0") + +lazy val core = project.settings( + name := "sbt-unzip", + crossScalaVersions := List("2.13.5", "2.12.13", "2.11.12") +) + + + +inThisBuild( + Seq( + name := "sbt-unzip", + organization := "io.github.djice", + homepage := Some(url("https://github.com/djice/sbt-unzip-plugin")), + licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), + developers := List( + Developer( + "djice", + "JABOUILLE Jean Charles", + "jcjabouille@gmail.com", + url("https://github.com/djice") + ) + ) + ) +) \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index f2a127b..f949d18 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.0") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") \ No newline at end of file diff --git a/project/scripted.sbt b/project/scripted.sbt index b6c5b40..ec4eaff 100644 --- a/project/scripted.sbt +++ b/project/scripted.sbt @@ -1 +1 @@ -libraryDependencies += { "org.scala-sbt" % "scripted-plugin_2.12" % sbtVersion.value } +libraryDependencies += { "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value } diff --git a/src/main/scala/com/typesafe/sbt/unzip/UnzipPlugin.scala b/src/main/scala/com/typesafe/sbt/unzip/UnzipPlugin.scala index 6bfce00..a00cc3c 100644 --- a/src/main/scala/com/typesafe/sbt/unzip/UnzipPlugin.scala +++ b/src/main/scala/com/typesafe/sbt/unzip/UnzipPlugin.scala @@ -32,10 +32,8 @@ object UnzipPlugin extends AutoPlugin { cReport.modules.foreach { mReport => val exclusionRule = ExclusionRule(mReport.module.organization, mReport.module.name) if(!dependenciesToExcludeOfUnzipList.contains(exclusionRule)) { - log.info(mReport.module.toString()) mReport.artifacts.foreach { artifact => val artifactFile = artifact._2 - log.info(artifact.toString()) if (artifactFile.name.endsWith(".zip")) { log.info(s"Unpacking ${mReport.module.name} bundle: ${artifactFile.getAbsolutePath} in ${filePathToExtract}") IO.unzip(artifactFile, filePathToExtract) diff --git a/version.sbt b/version.sbt deleted file mode 100644 index 6dc0588..0000000 --- a/version.sbt +++ /dev/null @@ -1 +0,0 @@ -version in ThisBuild := "1.0.0-SNAPSHOT"