Skip to content

Commit

Permalink
Prepare for the 0.7.3 release.
Browse files Browse the repository at this point in the history
If neither the java plugin nor the android plugin was found, the error
message will instruct the user to stay away from Gradle's new plugin DSL
because of #40.
  • Loading branch information
zhangkun83 committed Jan 4, 2016
1 parent 8203b2d commit 66c2236
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -17,15 +17,15 @@ 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 {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.2'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.3'
}
}
```
Expand All @@ -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'
}
}
```
Expand All @@ -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'
}
}
```
Expand All @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class ProtobufPlugin implements Plugin<Project> {
}

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
Expand Down

0 comments on commit 66c2236

Please sign in to comment.