Skip to content

Commit

Permalink
Revert "Check for 'org.gradle.java' in additional to 'java'."
Browse files Browse the repository at this point in the history
This reverts commit b232d46.
  • Loading branch information
zhangkun83 committed Jan 4, 2016
1 parent 36aa150 commit 8203b2d
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,11 @@ class ProtobufPlugin implements Plugin<Project> {
void apply(final Project project) {
this.project = project
def gv = project.gradle.gradleVersion =~ "(\\d*)\\.(\\d*).*"
if (!gv || !gv.matches() || gv.group(1).toInteger() < 2 || gv.group(2).toInteger() < 3) {
println("You are using Gradle ${project.gradle.gradleVersion}: This version of the protobuf plugin requires minimum Gradle version 2.3")
if (!gv || !gv.matches() || gv.group(1).toInteger() < 2 || gv.group(2).toInteger() < 2) {
println("You are using Gradle ${project.gradle.gradleVersion}: This version of the protobuf plugin requires minimum Gradle version 2.2")
}

// If the Java plugin was applied by "apply plugin:", it's added as "java".
// If it was applied by the "plugins {}" DSL, it's added as "org.gradle.java".
if (!project.plugins.hasPlugin('java') && !project.plugins.hasPlugin('org.gradle.java')
&& !Utils.isAndroidProject(project)) {
if (!project.plugins.hasPlugin('java') && !Utils.isAndroidProject(project)) {
throw new GradleException('Please apply the Java plugin or the Android plugin first')
}

Expand Down

0 comments on commit 8203b2d

Please sign in to comment.