Skip to content

Commit

Permalink
Merge pull request #128 from xerial/fix-sbt1.1.0
Browse files Browse the repository at this point in the history
#127: Fix for sbt-1.1.0-RC1
  • Loading branch information
xerial committed Dec 1, 2017
2 parents efee650 + 3b5d328 commit 9f33afb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 30 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ sudo: false

env:
- sbt_version=0.13.16
- sbt_version=1.0.3
- sbt_version=1.0.4
- sbt_version=1.1.0-RC1

script:
- sbt "^^ ${sbt_version}" compile scripted
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publishArtifact in Test := false
pomIncludeRepository := { _ => false }

sbtPlugin := true
crossSbtVersions := Vector("1.0.3", "0.13.16")
crossSbtVersions := Vector("1.0.4", "0.13.16")

parallelExecution := true
crossPaths := false
Expand Down
56 changes: 28 additions & 28 deletions src/main/scala/xerial/sbt/pack/PackPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,27 @@ object PackPlugin extends AutoPlugin with PackArchive {
//val packBatTemplate = settingKey[String]("template file for bash scripts - defaults to pack's out-of-the-box template for bat")
//val packMakeTemplate = settingKey[String]("template file for bash scripts - defaults to pack's out-of-the-box template for make")

val packMain = TaskKey[Map[String, String]]("prog_name -> main class table")
val packMainDiscovered = TaskKey[Map[String, String]]("discovered prog_name -> main class table")
val packExclude = SettingKey[Seq[String]]("pack-exclude", "specify projects whose dependencies will be excluded when packaging")
val packExcludeLibJars = SettingKey[Seq[String]]("pack-exclude", "specify projects to exclude when packaging. Its dependencies will be processed")
val packExcludeJars = SettingKey[Seq[String]]("pack-exclude-jars", "specify jar file name patterns to exclude when packaging")
val packMain = taskKey[Map[String, String]]("prog_name -> main class table")
val packMainDiscovered = taskKey[Map[String, String]]("discovered prog_name -> main class table")
val packExclude = settingKey[Seq[String]]("specify projects whose dependencies will be excluded when packaging")
val packExcludeLibJars = settingKey[Seq[String]]("specify projects to exclude when packaging. Its dependencies will be processed")
val packExcludeJars = settingKey[Seq[String]]("specify jar file name patterns to exclude when packaging")
val packExcludeArtifactTypes = settingKey[Seq[String]]("specify artifact types (e.g. javadoc) to exclude when packaging")
val packLibJars = TaskKey[Seq[(File, ProjectRef)]]("pack-lib-jars")
val packLibJars = taskKey[Seq[(File, ProjectRef)]]("pack-lib-jars")
val packGenerateWindowsBatFile = settingKey[Boolean]("Generate BAT file launch scripts for Windows")
val packGenerateMakefile = settingKey[Boolean]("Generate Makefile")

val packMacIconFile = SettingKey[String]("pack-mac-icon-file", "icon file name for Mac")
val packResourceDir = SettingKey[Map[File, String]](s"pack-resource-dir", "pack resource directory. default = Map({projectRoot}/src/pack -> \"\")")
val packMacIconFile = settingKey[String]("icon file name for Mac")
val packResourceDir = settingKey[Map[File, String]]("pack resource directory. default = Map({projectRoot}/src/pack -> \"\")")
val packAllUnmanagedJars = taskKey[Seq[(Classpath, ProjectRef)]]("all unmanaged jar files")
val packModuleEntries = taskKey[Seq[ModuleEntry]]("modules that will be packed")
val packJvmOpts = SettingKey[Map[String, Seq[String]]]("pack-jvm-opts")
val packExtraClasspath = SettingKey[Map[String, Seq[String]]]("pack-extra-classpath")
val packJvmOpts = settingKey[Map[String, Seq[String]]]("pack-jvm-opts")
val packExtraClasspath = settingKey[Map[String, Seq[String]]]("pack-extra-classpath")
val packExpandedClasspath = settingKey[Boolean]("Expands the wildcard classpath in launch scripts to point at specific libraries")
val packJarNameConvention = SettingKey[String]("pack-jarname-convention",
"default: (artifact name)-(version).jar; original: original JAR name; full: (organization).(artifact name)-(version).jar; no-version: (organization).(artifact name).jar")
val packDuplicateJarStrategy = SettingKey[String]("deal with duplicate jars. default to use latest version",
"latest: use the jar with a higher version; exit: exit the task with error")
val packJarNameConvention = settingKey[String]("default: (artifact name)-(version).jar; original: original JAR name; full: (organization).(artifact name)-(version).jar; no-version: (organization).(artifact name).jar")
val packDuplicateJarStrategy = settingKey[String](
"""deal with duplicate jars. default to use latest version
|latest: use the jar with a higher version; exit: exit the task with error""".stripMargin)
val packCopyDependenciesTarget = settingKey[File]("target folder used by the <packCopyDependencies> task.")
val packCopyDependencies = taskKey[Unit](
"""just copies the dependencies to the <packCopyDependencies> folder.
Expand All @@ -86,19 +86,19 @@ object PackPlugin extends AutoPlugin with PackArchive {
|The use of symbolic links allows faster processing and save disk space.
""".stripMargin)

val packArchivePrefix = SettingKey[String]("prefix of (prefix)-(version).(format) archive file name")
val packArchiveName = SettingKey[String]("archive file name. Default is (project-name)-(version)")
val packArchiveStem = SettingKey[String]("directory name within the archive. Default is (archive-name)")
val packArchiveExcludes = SettingKey[Seq[String]]("List of excluding files from the archive")
val packArchiveTgzArtifact = SettingKey[Artifact]("tar.gz archive artifact")
val packArchiveTbzArtifact = SettingKey[Artifact]("tar.bz2 archive artifact")
val packArchiveTxzArtifact = SettingKey[Artifact]("tar.xz archive artifact")
val packArchiveZipArtifact = SettingKey[Artifact]("zip archive artifact")
val packArchiveTgz = TaskKey[File]("pack-archive-tgz", "create a tar.gz archive of the distributable package")
val packArchiveTbz = TaskKey[File]("pack-archive-tbz", "create a tar.bz2 archive of the distributable package")
val packArchiveTxz = TaskKey[File]("pack-archive-txz", "create a tar.xz archive of the distributable package")
val packArchiveZip = TaskKey[File]("pack-archive-zip", "create a zip archive of the distributable package")
val packArchive = TaskKey[Seq[File]]("pack-archive", "create a tar.gz and a zip archive of the distributable package")
val packArchivePrefix = settingKey[String]("prefix of (prefix)-(version).(format) archive file name")
val packArchiveName = settingKey[String]("archive file name. Default is (project-name)-(version)")
val packArchiveStem = settingKey[String]("directory name within the archive. Default is (archive-name)")
val packArchiveExcludes = settingKey[Seq[String]]("List of excluding files from the archive")
val packArchiveTgzArtifact = settingKey[Artifact]("tar.gz archive artifact")
val packArchiveTbzArtifact = settingKey[Artifact]("tar.bz2 archive artifact")
val packArchiveTxzArtifact = settingKey[Artifact]("tar.xz archive artifact")
val packArchiveZipArtifact = settingKey[Artifact]("zip archive artifact")
val packArchiveTgz = taskKey[File]("create a tar.gz archive of the distributable package")
val packArchiveTbz = taskKey[File]("create a tar.bz2 archive of the distributable package")
val packArchiveTxz = taskKey[File]("create a tar.xz archive of the distributable package")
val packArchiveZip = taskKey[File]("create a zip archive of the distributable package")
val packArchive = taskKey[Seq[File]]("create a tar.gz and a zip archive of the distributable package")
}

import complete.DefaultParsers._
Expand Down Expand Up @@ -407,7 +407,7 @@ object PackPlugin extends AutoPlugin with PackArchive {
}
)

//private def getFromAllProjects[T](targetTask: TaskKey[T])(currentProject: ProjectRef, structure: BuildStructure): Task[Seq[(T, ProjectRef)]] =
//private def getFromAllProjects[T](targetTask: taskKey[T])(currentProject: ProjectRef, structure: BuildStructure): Task[Seq[(T, ProjectRef)]] =
private def getFromAllProjects[T](targetTask: TaskKey[T], state: State): Task[Seq[(T, ProjectRef)]] =
getFromSelectedProjects(targetTask, state, Seq.empty)

Expand Down

0 comments on commit 9f33afb

Please sign in to comment.