项目作者: sinwe

项目描述 :
Gradle Hazelcast Plugin
高级语言: Groovy
项目地址: git://github.com/sinwe/gradle-hazelcast-plugin.git
创建时间: 2018-05-21T14:01:05Z
项目社区:https://github.com/sinwe/gradle-hazelcast-plugin

开源协议:Apache License 2.0

下载


Gradle Hazelcast cache backend plugin

Build Status
Gradle Hazelcast Plugin
Code Quality: Java
Total Alerts

A simple settings plugin that enables build caching in Gradle with a Hazelcast node as the backend. The Hazelcast node itself needs to be set up separately.

For a production-ready build cache implementation (featuring node management, usage statistics, health monitoring, replication, access control and more), see Gradle Enteprise.

For an alternative http-based build cache implementation, see HTTP Build Cache Server

How to use

Add this to your settings.gradle:

  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. }
  5. dependencies {
  6. classpath "com.github.sinwe.gradle.caching.hazelcast:gradle-hazelcast-plugin:0.13"
  7. }
  8. }
  9. apply plugin: "com.github.sinwe.gradle.caching.hazelcast"
  10. buildCache {
  11. // Note: the local cache is disabled by default when applying the plugin
  12. remote(com.github.sinwe.gradle.caching.hazelcast.HazelcastBuildCache) {
  13. host = "127.0.0.1" //support comma separated multiple hosts
  14. port = 5701
  15. name = "gradle-build-cache"
  16. enabled = true
  17. push = true
  18. }
  19. }

You can also specify the location and name of the Hazelcast cache via system properties (though values specified in the settings.gradle override the ones specified by system properties):

System property Function Default value
com.github.sinwe.gradle.caching.hazelcast.host host name of the Hazelcast node 127.0.0.1
com.github.sinwe.gradle.caching.hazelcast.port TCP port of the Hazelcast node 5701
com.github.sinwe.gradle.caching.hazelcast.name name of the cache gradle-task-cache