Git Product home page Git Product logo

distribution-sha-plugin's Introduction

Automatic Distribution Sha Plugin

CircleCI

This plugin makes discovering the sha256-sum of a gradle distribution automatic.

Use

Apply to the root project:

plugins {
    id "com.github.sghill.distribution-sha" version "0.4.0"
}

Or to apply to every project you run, create an init script ~/.gradle/init.d/auto-sha.gradle:

initscript {
    repositories {
        gradlePluginPortal()
    }
    dependencies {
        classpath 'com.github.sghill.gradle:distribution-sha-plugin:0.4.0'
    }
}
apply plugin: com.github.sghill.gradle.DistributionShaInitPlugin

How

With the plugin applied, the wrapper task is configured to fetch distributionUrl + ".sha256" and provide its contents as the gradle-distribution-sha256-sum arg automatically:

$ ./gradlew wrapper --gradle-version 4.9 --distribution-type all
$ cat gradle/wrapper/gradle-wrapper.properties | grep distribution

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=39e2d5803bbd5eaf6c8efe07067b0e5a00235e8c71318642b2ed262920b27721
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip

Previously

To get this feature on wrapper upgrades without the plugin you'd need to get the contents of the .sha256 file and add it to the command:

./gradlew wrapper --gradle-version 4.9 --distribution-type all --gradle-distribution-sha256-sum 39e2d5803bbd5eaf6c8efe07067b0e5a00235e8c71318642b2ed262920b27721

Understandably, this means that many projects with a checked-in wrapper aren't using this feature.

distribution-sha-plugin's People

Contributors

sghill avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.