Skip to content

Commit 4569229

Browse files
committed
Reinstate and deprecate older methods to preserve binary backward compatibility with 1.0.4
The methods in question are the methods used to create various kinds of archives (e.g. zip or tar) from `com.typesafe.sbt.packager.universal.Archives`
1 parent a16c9ec commit 4569229

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

src/main/scala/com/typesafe/sbt/packager/universal/Archives.scala

+49
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ import sbt._
77
/** Helper methods to package up files into compressed archives. */
88
object Archives {
99

10+
/**
11+
* Makes a zip file in the given target directory using the given name.
12+
* @param target folder to build package in
13+
* @param name of output (without extension)
14+
* @param mappings included in the output
15+
* @param top level directory
16+
* @return zip file
17+
*/
18+
@deprecated(
19+
"Use [[com.typesafe.sbt.packager.universal.Archives.makeZip(File, String, Seq[(File, String)], Option[String], Seq[String]): File]]",
20+
since = "1.0.5"
21+
)
22+
def makeZip(target: File, name: String, mappings: Seq[(File, String)], top: Option[String]): File =
23+
makeZip(target, name, mappings, top, options = Seq.empty[String])
24+
1025
/**
1126
* Makes a zip file in the given target directory using the given name.
1227
*
@@ -29,6 +44,22 @@ object Archives {
2944
zip
3045
}
3146

47+
/**
48+
* Makes a zip file in the given target directory using the given name.
49+
*
50+
* @param target folder to build package in
51+
* @param name of output (without extension)
52+
* @param mappings included in the output
53+
* @param top level directory
54+
* @return zip file
55+
*/
56+
@deprecated(
57+
"Use [[com.typesafe.sbt.packager.universal.Archives.makeNativeZip(File, String, Seq[(File, String)], Option[String], Seq[String]): File]]",
58+
since = "1.0.5"
59+
)
60+
def makeNativeZip(target: File, name: String, mappings: Seq[(File, String)], top: Option[String]): File =
61+
makeNativeZip(target, name, mappings, top, options = Seq.empty[String])
62+
3263
/**
3364
* Makes a zip file in the given target directory using the given name.
3465
*
@@ -51,6 +82,24 @@ object Archives {
5182
zip
5283
}
5384

85+
/**
86+
* Makes a dmg file in the given target directory using the given name.
87+
*
88+
* Note: Only works on OSX
89+
*
90+
* @param target folder to build package in
91+
* @param name of output (without extension)
92+
* @param mappings included in the output
93+
* @param top level directory : NOT USED
94+
* @return dmg file
95+
*/
96+
@deprecated(
97+
"Use [[com.typesafe.sbt.packager.universal.Archives.makeDmg(target: File, name: String, mappings: Seq[(File, String)], top: Option[String], options: Seq[String]): File]]",
98+
since = "1.0.5"
99+
)
100+
def makeDmg(target: File, name: String, mappings: Seq[(File, String)], top: Option[String]): File =
101+
makeDmg(target, name, mappings, top, options = Seq.empty[String])
102+
54103
/**
55104
* Makes a dmg file in the given target directory using the given name.
56105
*

0 commit comments

Comments
 (0)