mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-20 16:57:34 +01:00
dont crash out if no .git folder is present
This commit is contained in:
parent
708564ff22
commit
7fc70058dc
1
CHANGES
1
CHANGES
@ -1,6 +1,7 @@
|
||||
v1.5.2 (TBA)
|
||||
-Fixed (issue #299) - output smali filename errors to screen during rebuild instead of filestream
|
||||
-Only show the --aapt / -a info in verbose mode.
|
||||
-Fixed (issue #392) - Don't crash out if .git folder isn't present. Use SNAPSHOT-DEV instead.
|
||||
|
||||
v1.5.1 PR3 (Released December 23 - 2012) Codename: Pre Release 3
|
||||
-Reverted "Prevents removal of <uses-sdk> on decompile, but then throws warning on rebuild (issue #366)"
|
||||
|
12
build.gradle
12
build.gradle
@ -29,6 +29,7 @@ task wrapper(type: Wrapper) {
|
||||
}
|
||||
|
||||
// If anyone uses this outside of GoogleCode (Apktool) developers. I will hunt you down and hurt you.
|
||||
// This is for official releases only.
|
||||
task release {
|
||||
}
|
||||
|
||||
@ -93,9 +94,14 @@ subprojects {
|
||||
|
||||
// kudos #smali - JesusFreke, for how to build release task
|
||||
if (!('release' in gradle.startParameter.taskNames)) {
|
||||
ant.loadfile(srcFile: "../../.git/refs/heads/master", property: fullrev)
|
||||
gitrev_version = ant.properties[fullrev].substring(0,10);
|
||||
println "Building SNAPSHOT: " + gitrev_version;
|
||||
ant.loadfile(srcFile: "../../.git/refs/heads/master", property: fullrev, failonerror: false);
|
||||
if (ant.properties[fullrev] == null) {
|
||||
gitrev_version = "SNAPSHOT_DEV";
|
||||
println "Building SNAPSHOT (no .git folder found)";
|
||||
} else {
|
||||
gitrev_version = ant.properties[fullrev].substring(0,10);
|
||||
println "Building SNAPSHOT: " + gitrev_version;
|
||||
}
|
||||
} else {
|
||||
gitrev_version = '';
|
||||
println "Building RELEASE: " + apktoolversion;
|
||||
|
Loading…
x
Reference in New Issue
Block a user