Skip to content

Commit

Permalink
Support importing libraries that have .tgz as extension
Browse files Browse the repository at this point in the history
  • Loading branch information
wgreven-ibr committed Oct 12, 2017
1 parent 0a0cf07 commit a32d663
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class SourceDistPackage {
}

private String getRequiresTextFile() {
if (packageFile.absolutePath.contains('.tar.')) {
if (packageFile.absolutePath.contains('.tar.') || packageFile.absolutePath.endsWith('.tgz')) {
return explodeTarForRequiresText()
} else {
return explodeZipForRequiresText()
Expand All @@ -167,7 +167,6 @@ class SourceDistPackage {
return ''
}


private String explodeTarForRequiresText() {
TarArchiveInputStream tarIn = explodeArtifact()

Expand All @@ -191,7 +190,7 @@ class SourceDistPackage {
BufferedInputStream inputStream = new BufferedInputStream(fin)
InputStream compressorInputStream

if (packageFile.absolutePath.endsWith('.gz')) {
if (packageFile.absolutePath.endsWith('.gz') || packageFile.absolutePath.endsWith('.tgz')) {
compressorInputStream = new GzipCompressorInputStream(inputStream)
} else if (packageFile.absolutePath.endsWith('.bz2')) {
compressorInputStream = new BZip2CompressorInputStream(inputStream)
Expand Down

0 comments on commit a32d663

Please sign in to comment.