Git Product home page Git Product logo

cake.gradle's Introduction

Cake.Gradle

standard-readme compliant Build Codecov Report NuGet package All Contributors

Aliases to assist with running Gradle builds from Cake build scripts.

Table of Contents

Install

#addin nuget:?package=Cake.Gradle

Additionally, either gradle has to be installed on the system or the project needs a gradle-wrapper (gradlew)

Usage

 #addin nuget:?package=Cake.Gradle

// Run 'gradle --version'
Task("Gradle-Version")
    .Does(() =>
{
    Gradle.WithArguments("--version").Run();
});

// Run 'gradle hello' in a specific folder
// Note: if you have a gradle wrapper setup in the specified path, this one will be used
Task("Gradle-Hello")
    .Does(() =>
{
    Gradle.FromPath("./example").WithTask("hello").Run();
});


// Run 'gradle hello' in a specific folder with default log level
// Note: if no log level is set, it is derived from the Cake verbosity (which is set to 'verbose' in build.ps1)
Task("Gradle-Hello-WithDefaultLogLevel")
    .Does(() =>
{
    Gradle.FromPath("./example").WithTask("hello").WithLogLevel(GradleLogLevel.Default).Run(); 
});

// Run 'gradle --offline --build-file build.gradle hello' in a specific folder
Task("Gradle-Hello-WithArguments")
    .Does(() =>
{
    Gradle.FromPath("./example").WithTask("hello").WithArguments("--offline --build-file build.gradle").Run();
});

Compatibility

Cake 0.33.0 and later.

Motivation

Allow Cake users to orchestrate a complex build including a Gradle-based Java build. Works similar to the cake-gulp addin.

A Word of caution

Cake and Gradle are both task runners. I consider it bad practice to call one task runner out of another. It would be better to only have one tool per concern (i.e. task running) - but sometimes this is not feasible.

Discussion

For questions and to discuss ideas & feature requests, use the GitHub discussions on the Cake GitHub repository, under the Extension Q&A category.

Join in the discussion on the Cake repository

Maintainer

Nils Andresen @nils-a

Contributing

Cake.Gradle follows the Contributor Covenant Code of Conduct.

We accept Pull Requests. Please see the contributing file for how to contribute to Cake.Gradle.

Small note: If editing the Readme, please conform to the standard-readme specification.

This project follows the all-contributors specification. Contributions of any kind welcome!

Contributors

Thanks goes to these wonderful people (emoji key):


Christian Abegg

๐Ÿ’ป

Nils Andresen

๐Ÿ’ป

License

MIT License ยฉ Christian Abegg, Nils Andresen

Cake.Gradle includes third-party code which is licensed under its own respective license.

LitJSON

License: Unlicense, https://github.com/LitJSON/litjson/blob/develop/COPYING

cake.gradle's People

Contributors

nils-a avatar renovate-bot avatar dependabot[bot] avatar abeggchr avatar gep13 avatar juergenrb avatar github-actions[bot] avatar jericho avatar jessejiang0214 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.