Skip to content

Commit

Permalink
Merge pull request JakeWharton#41 from klynch/master
Browse files Browse the repository at this point in the history
Plugin check should check for extensions too
  • Loading branch information
JakeWharton committed Jul 23, 2014
2 parents 73a2404 + 97619d2 commit 210f8e4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import org.gradle.api.tasks.compile.JavaCompile

class HugoPlugin implements Plugin<Project> {
@Override void apply(Project project) {
def hasApp = project.plugins.hasPlugin(AppPlugin)
def hasLib = project.plugins.hasPlugin(LibraryPlugin)
def hasApp = project.plugins.withType(AppPlugin)
def hasLib = project.plugins.withType(LibraryPlugin)
if (!hasApp && !hasLib) {
throw new IllegalStateException("'android' or 'android-library' plugin required.")
}
Expand Down

0 comments on commit 210f8e4

Please sign in to comment.