Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #84 from sschuberth/develop
Browse files Browse the repository at this point in the history
Minor formatting / wording improvements
  • Loading branch information
Xavi Rigau committed Jul 6, 2015
2 parents 080082b + 5f25b41 commit bb0b47f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class AdbTask extends org.gradle.api.DefaultTask {
if (matcher) {
def intentation = matcher[0][1] + ' '
def name = null, main = false, launcher = false, disabled = false

// Parse the indented block for the current activity alias.
while (it.hasNext() && (nextLine = it.next()).startsWith(intentation)) {
matcher = nextLine =~ /A: android:name.*="([^"]+)"/
Expand All @@ -66,7 +66,7 @@ public class AdbTask extends org.gradle.api.DefaultTask {
}
main = main || nextLine.contains('android.intent.action.MAIN')
launcher = launcher || nextLine.contains('android.intent.category.LAUNCHER')

// Exclude disabled entries.
disabled = disabled || nextLine ==~ /^(\s+)A: android:enabled.*=.*0x0$/
}
Expand Down Expand Up @@ -105,13 +105,13 @@ public class AdbTask extends org.gradle.api.DefaultTask {
protected void assertDeviceConnected() {
def id = getDeviceId()
if (!pluginEx.deviceIds().contains(id))
throw new IllegalStateException("Device $id is not found!")
throw new IllegalStateException("Device with ID $id not found")
printDeviceInfo()
}

private String readApkProperty(String propertyKey) {
if (apkPath == null) {
throw new IllegalStateException("No apk found for the task $name")
throw new IllegalStateException("No APK found for the '$name' task")
}
String output = [pluginEx.aapt, 'dump', 'badging', apkPath].execute().text.readLines().find {
it.startsWith("$propertyKey:")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package com.novoda.gradle.command

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.StopExecutionException
Expand Down Expand Up @@ -29,7 +30,7 @@ public class AndroidCommandPlugin implements Plugin<Project> {
def androidHome
if (androidExtension.hasProperty('sdkHandler')) {
androidHome = "${androidExtension.sdkHandler.sdkFolder}"
} else if(androidExtension.hasProperty('sdkDirectory')) {
} else if (androidExtension.hasProperty('sdkDirectory')) {
androidHome = "${androidExtension.sdkDirectory}"
} else {
throw new IllegalStateException('The android plugin is not exposing the SDK folder in an expected way.')
Expand Down

0 comments on commit bb0b47f

Please sign in to comment.