Plugin for Gradle to update your project dependencies status on VersionEye based on the resolved dependency configurations of your Gradle project.
It works quite similar to the VersionEye plugin for Maven.
The simplest way to apply the plugin to your Gradle build is using the latest release hosted on Maven Central:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.standardout:gradle-versioneye-plugin:0.1.1'
}
}
apply plugin: 'versioneye'
gradle-versioneye-plugin has been tested with Gradle 1.11.
You need to provide your VersionEye API key for the plugin to be able to communicate with the VersionEye API. You do this through a property, e.g. by specifying it in the gradle.properties file in ~/.gradle/ or the project directory, or via the command line. However, it is strongly recommended not to place it somewhere where it is publicly accessible (e.g. in a public GitHub repository).
versioneye.api_key=1234567890abcdef
If logged in to VersionEye, you can get or generate your API key here.
The versioneye plugin comes with two Gradle tasks that are relevant for you:
- versioneye-create - Creates a project on VersionEye and write the project key and identifier to your project's gradle.properties (so they can be used with versioneye-update)
- versioneye-update - Updates the dependencies for the project on VersionEye that is identified by the project key and your API key
Example call creating a VersionEye project - in this case the API key is provided via the command line:
gradle -Pversioneye.api_key=1234567890abcdef -info versioneye-create
Once you create a VersionEye project with versioneye-create, it will add the versioneye.projectkey
and versioneye.projectid
properties to the gradle.properties file in your project directory. But you can also provide these settings manually in any way Gradle supports specifying properties (e.g. if you already have an existing VersionEye project).
There are two main modes, you can use only the declared dependencies or additionally the transitive dependencies:
- declared - only first level dependencies are included (default)
- transitive - the declared and all transitive dependencies
Configuration example:
versioneye {
dependencies = transitive
}
To further customize which dependencies are analyzed, you can exclude specific configurations, for example to exclude the dependencies that are only needed for tests with the Gradle Java plugin:
versioneye {
exclude 'testCompile', 'testRuntime'
}
Please note that if you exclude a configuration that is extended by another configuration that you did not exclude, this will have no effect (e.g. if you exclude runtime but don't exclude testRuntime).