aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2013-10-04 06:39:30 -0700
committerTor Norbye <tnorbye@google.com>2013-10-04 06:39:30 -0700
commit563bcf7d5b9a2acff3eb7ffb622a808d574bd4b9 (patch)
treede72f37346a7dbc7d7677eadd429c1b4b713dcc0
parent859f4a403897a38acfbcdf57750c5885a03ac386 (diff)
downloadbuild-563bcf7d5b9a2acff3eb7ffb622a808d574bd4b9.tar.gz
Tweak the user message for the 1.8 gradle dependency
Change-Id: I348eb7b33de55f20d89dbb06c209645aabf52463
-rw-r--r--gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy12
1 files changed, 9 insertions, 3 deletions
diff --git a/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy b/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy
index 7731366..7c6906a 100644
--- a/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy
+++ b/gradle/src/main/groovy/com/android/build/gradle/BasePlugin.groovy
@@ -119,6 +119,7 @@ import static com.android.builder.BuilderConstants.FD_INSTRUMENT_RESULTS
import static com.android.builder.BuilderConstants.FD_INSTRUMENT_TESTS
import static com.android.builder.BuilderConstants.FD_REPORTS
import static com.android.builder.BuilderConstants.INSTRUMENT_TEST
+import static java.io.File.separator
/**
* Base class for all Android plugins
@@ -235,10 +236,15 @@ public abstract class BasePlugin {
}
if (!foundMatch) {
+ File file = new File("gradle" + separator + "wrapper" + separator +
+ "gradle-wrapper.properties");
throw new BuildException(
- String.format(
- "Gradle version %s is required. Current version is %s",
- GRADLE_MIN_VERSION, project.getGradle().gradleVersion), null);
+ String.format(
+ "Gradle version %s is required. Current version is %s. " +
+ "If using the gradle wrapper, try editing the distributionUrl in %s " +
+ "to gradle-%s-all.zip",
+ GRADLE_MIN_VERSION, project.getGradle().gradleVersion, file.getAbsolutePath(),
+ GRADLE_MIN_VERSION), null);
}
}