-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
56 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
/** | ||
* Titanium SDK | ||
* Copyright TiDev, Inc. 04/07/2022-Present | ||
* Licensed under the terms of the Apache Public License. | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
// Extracts a "*.tar" file using the same parameters as the ant <untar/> task. | ||
// Used by our prebuild step to extract our "libv8-*.tar.bz2" file. | ||
task untar() { | ||
// Throw an error if required gradle property has not been set. | ||
if (!project.hasProperty('src')) { | ||
throw new InvalidUserDataException('You must set a "src" property.') | ||
} | ||
|
||
// Assign a default value to any unassigned properties. | ||
if (!project.hasProperty('compression')) { | ||
project.ext.compression = 'none' | ||
} | ||
if (!project.hasProperty('overwrite')) { | ||
project.ext.overwrite = 'true' | ||
} | ||
if (!project.hasProperty('dest')) { | ||
def sourceFile = new File(src) | ||
project.ext.dest = sourceFile.getParentFile().getPath() | ||
} | ||
|
||
// Use "ant" to extract the given tarball. | ||
ant.untar( | ||
compression: project.properties.compression, | ||
overwrite: project.properties.overwrite, | ||
src: project.properties.src, | ||
dest: project.properties.dest) | ||
} | ||
|
||
defaultTasks 'untar' | ||
/** | ||
* Titanium SDK | ||
* Copyright TiDev, Inc. 04/07/2022-Present | ||
* Licensed under the terms of the Apache Public License. | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
// Extracts a "*.tar" file using the same parameters as the ant <untar/> task. | ||
// Used by our prebuild step to extract our "libv8-*.tar.bz2" file. | ||
tasks.register('untar') { | ||
// Throw an error if required gradle property has not been set. | ||
if (!project.hasProperty('src')) { | ||
throw new InvalidUserDataException('You must set a "src" property.') | ||
} | ||
|
||
// Assign a default value to any unassigned properties. | ||
if (!project.hasProperty('compression')) { | ||
project.ext.compression = 'none' | ||
} | ||
if (!project.hasProperty('overwrite')) { | ||
project.ext.overwrite = 'true' | ||
} | ||
if (!project.hasProperty('dest')) { | ||
def sourceFile = new File(src) | ||
project.ext.dest = sourceFile.getParentFile().getPath() | ||
} | ||
|
||
// Use "ant" to extract the given tarball. | ||
ant.untar( | ||
compression: project.properties.compression, | ||
overwrite: project.properties.overwrite, | ||
src: project.properties.src, | ||
dest: project.properties.dest) | ||
} | ||
|
||
defaultTasks 'untar' |