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

Minor formatting / wording improvements #84

Merged
merged 3 commits into from
Jul 6, 2015
Merged
Show file tree
Hide file tree
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 @@ -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