Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,12 @@ public class TinkerManifestTask extends DefaultTask {
def isr = null
try {
isr = new InputStreamReader(new FileInputStream(manifestPath), "utf-8")
def xml = new XmlParser().parse(isr)
def ns = new Namespace("http://schemas.android.com/apk/res/android", "android")

def application = xml.application[0]
if (application) {
return application.attributes()[ns.name]
} else {
return null
}
def result = new XmlSlurper().parse(isr)
def namespaceMap = new HashMap()
namespaceMap.put("android", "http://schemas.android.com/apk/res/android")
result.declareNamespace(namespaceMap)
def applicationName = result.application.@"android:name".text()
return applicationName.length() > 0 ? applicationName : null
} finally {
IOHelper.closeQuietly(isr)
}
Expand Down