diff --git a/README.md b/README.md index 0db46ce4..2f4bbac0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ probably reading the documentation for the __HEAD revision__, which may not apply to the released version you are using. To read the documentation of a released version, you will need to switch to the corresponding release tag, -e.g., [v0.7.2](https://github.com/google/protobuf-gradle-plugin/tree/v0.7.2). +e.g., [v0.7.3](https://github.com/google/protobuf-gradle-plugin/tree/v0.7.3). # Protobuf Plugin for Gradle The Gradle plugin that compiles Protocol Buffer (aka. Protobuf) definition @@ -17,7 +17,7 @@ For more information about the Protobuf Compiler, please refer to [Google Developers Site](https://developers.google.com/protocol-buffers/docs/reference/java-generated?csw=1). ## Latest Version -The latest version is ``0.7.2``. It is available on Maven Central. To add +The latest version is ``0.7.3``. It is available on Maven Central. To add dependency to it: ```gradle buildscript { @@ -25,7 +25,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.2' + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.3' } } ``` @@ -39,7 +39,7 @@ buildscript { } } dependencies { - classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.2-SNAPSHOT' + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.4-SNAPSHOT' } } ``` @@ -53,7 +53,7 @@ buildscript { mavenLocal() } dependencies { - classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.2-SNAPSHOT' + classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.4-SNAPSHOT' } } ``` @@ -62,6 +62,9 @@ buildscript { ### Adding the plugin to your project +:warning: this plugin __does not__ work under the new plugins DSL of Gradle +(#40). Use the traditional `apply` method instead. + In Java projects, you must apply the java plugin before applying the Protobuf plugin: diff --git a/build.gradle b/build.gradle index 54a7b024..6ef4ac8d 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ apply plugin: "com.gradle.plugin-publish" apply plugin: 'signing' group = 'com.google.protobuf' -version = '0.7.2' +version = '0.7.3' ext.isReleaseVersion = !version.endsWith("SNAPSHOT") diff --git a/src/main/groovy/com/google/protobuf/gradle/ProtobufPlugin.groovy b/src/main/groovy/com/google/protobuf/gradle/ProtobufPlugin.groovy index 35ec9beb..b6326953 100644 --- a/src/main/groovy/com/google/protobuf/gradle/ProtobufPlugin.groovy +++ b/src/main/groovy/com/google/protobuf/gradle/ProtobufPlugin.groovy @@ -60,7 +60,9 @@ class ProtobufPlugin implements Plugin { } if (!project.plugins.hasPlugin('java') && !Utils.isAndroidProject(project)) { - throw new GradleException('Please apply the Java plugin or the Android plugin first') + throw new GradleException('Please apply the Java plugin or the Android plugin first.' + + ' This error may also be a result of using the new Gradle plugins DSL.' + + ' Please use the traditional "apply" function as described in README.md.') } // Provides the osdetector extension