Skip to content

William-Hill-Online/cassandra-gradle-plugin

Repository files navigation

Build Status Maven Central

Gradle Cassandra Plugin

The Gradle Cassandra Plugin allows you to run an embedded instance of Cassandra from your gradle build. It is based on the Cassandra Unit.

Plugin is available on the Gradle Plugin Portal.

Usage

Enable the plugin in your gradle build:

plugins {
  id 'com.williamhill.cassandra' version '0.4'
}

You can now declare a dependency on a running Cassandra instance from any of your tasks:

task integrationTest(type: Test) {
    runWithCassandra = true
}

Configuration

Configure your Cassandra instance inside a cassandra block:

cassandra {
    port 9042
    schemaFilePath "src/test/resources/schema.cql"
    ...
}

The cassandra configuration block can be declared at either the project or the task level. Task-level configuration inherits from any project-level configuration provided.

The following properties are configurable:

Tasks

For your convenience the plugin also adds the following tasks to your buildscript:

$ gradle tasks
...
Cassandra tasks
-----------
startCassandra - Starts a local Cassandra instance
stopCassandra - Stops the local Cassandra instance
...

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages