Convert Figma logo to code with AI

nuke-build logonuke

🏗 The AKEless Build System for C#/.NET

2,870
348
2,870
71

Top Related Projects

3,898

:cake: Cake (C# Make) is a cross platform build automation system.

1,552

A build automation tool written in PowerShell

39,519

🚀 The easiest way to automate building and releasing your iOS and Android apps

16,773

Adaptable, fast automation for all

4,281

Apache Maven core

5,207

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.

Quick Overview

NUKE is a cross-platform build automation system for .NET projects. It leverages the power of C# and .NET to provide a flexible, type-safe, and IDE-friendly way to define build processes. NUKE aims to simplify complex build scenarios while offering excellent integration with popular CI/CD systems.

Pros

  • Type-safe and refactoring-friendly build definitions using C#
  • Excellent IDE support with IntelliSense and debugging capabilities
  • Seamless integration with popular CI/CD systems
  • Extensible plugin system for custom tasks and integrations

Cons

  • Steeper learning curve for developers not familiar with C#
  • Requires .NET runtime, which may not be ideal for all environments
  • Less established compared to some other build automation tools
  • May be overkill for very simple projects

Code Examples

  1. Defining a simple build target:
Target Clean => _ => _
    .Before(Restore)
    .Executes(() =>
    {
        EnsureCleanDirectory(OutputDirectory);
    });
  1. Compiling a solution:
Target Compile => _ => _
    .DependsOn(Restore)
    .Executes(() =>
    {
        DotNetBuild(s => s
            .SetProjectFile(Solution)
            .SetConfiguration(Configuration)
            .EnableNoRestore());
    });
  1. Running tests:
Target Test => _ => _
    .DependsOn(Compile)
    .Executes(() =>
    {
        DotNetTest(s => s
            .SetProjectFile(Solution)
            .SetConfiguration(Configuration)
            .EnableNoBuild()
            .EnableNoRestore());
    });

Getting Started

  1. Install the NUKE global tool:

    dotnet tool install Nuke.GlobalTool --global
    
  2. Set up NUKE in your project:

    nuke :setup
    
  3. Define your build targets in the generated Build.cs file:

    class Build : NukeBuild
    {
        public static int Main() => Execute<Build>(x => x.Compile);
    
        Target Clean => _ => _
            .Executes(() =>
            {
                EnsureCleanDirectory(OutputDirectory);
            });
    
        Target Compile => _ => _
            .DependsOn(Clean)
            .Executes(() =>
            {
                DotNetBuild(s => s
                    .SetProjectFile(Solution)
                    .SetConfiguration(Configuration));
            });
    }
    
  4. Run your build:

    nuke
    

Competitor Comparisons

3,898

:cake: Cake (C# Make) is a cross platform build automation system.

Pros of Cake

  • More mature and established project with a larger community and ecosystem
  • Supports multiple programming languages (C#, F#, VB.NET)
  • Extensive documentation and a wide range of available addins

Cons of Cake

  • Uses a custom DSL, which can have a steeper learning curve
  • Less type-safe compared to Nuke's C# approach
  • May require more setup and configuration for complex scenarios

Code Comparison

Cake:

Task("Build")
    .Does(() =>
{
    DotNetCoreBuild("./src/MyProject.sln");
});

RunTarget("Build");

Nuke:

Target Build => _ => _
    .Executes(() =>
{
    DotNetBuild(s => s
        .SetProjectFile(Solution));
});

Both Cake and Nuke are popular build automation systems for .NET projects. Cake uses a custom DSL and supports multiple languages, while Nuke leverages C# for a more type-safe approach. Cake has a larger ecosystem and more extensive documentation, but Nuke offers better IDE integration and compile-time checking. The choice between them often depends on project requirements and team preferences.

1,552

A build automation tool written in PowerShell

Pros of psake

  • Written in PowerShell, making it familiar for Windows-centric developers
  • Lightweight and easy to set up with minimal dependencies
  • Flexible task definition syntax allowing for complex build processes

Cons of psake

  • Limited cross-platform support compared to Nuke
  • Less robust IDE integration and tooling
  • Smaller community and ecosystem compared to Nuke

Code Comparison

psake task definition:

task Build {
    exec { msbuild MyProject.sln /t:Build /p:Configuration=Release }
}

Nuke task definition:

Target Build => _ => _
    .Executes(() =>
    {
        MSBuild(s => s
            .SetTargetPath(Solution)
            .SetTargets("Rebuild")
            .SetConfiguration(Configuration));
    });

Both psake and Nuke are build automation tools, but they cater to different ecosystems. psake is PowerShell-based and primarily targets Windows environments, while Nuke is a cross-platform .NET-based build automation system. Nuke offers stronger typing, better IDE integration, and more extensive cross-platform support, making it suitable for larger and more complex projects. psake, on the other hand, is lightweight and easy to set up, making it a good choice for simpler Windows-centric projects or teams already familiar with PowerShell.

39,519

🚀 The easiest way to automate building and releasing your iOS and Android apps

Pros of fastlane

  • Extensive ecosystem with a wide range of plugins and integrations
  • Well-established community and extensive documentation
  • Supports multiple platforms (iOS, Android, macOS)

Cons of fastlane

  • Ruby-based, which may not be ideal for all development teams
  • Can be complex to set up and configure for larger projects
  • Performance may be slower compared to compiled alternatives

Code Comparison

fastlane:

lane :beta do
  build_app(scheme: "MyApp")
  upload_to_testflight
end

NUKE:

Target Beta => _ => _
    .DependsOn(Compile)
    .Executes(() =>
    {
        DotNetBuild(s => s
            .SetProjectFile(Solution)
            .SetConfiguration(Configuration));
    });

NUKE is a .NET-based build automation system, while fastlane is Ruby-based and primarily focused on mobile app development. NUKE offers strong typing and IDE support, making it more suitable for .NET developers. fastlane has a broader scope and extensive plugin ecosystem, making it versatile for mobile app deployment workflows. NUKE's performance may be better due to its compiled nature, while fastlane's interpreted Ruby code might be slower for complex builds. Both tools aim to simplify and automate the build and deployment process, but cater to different ecosystems and development preferences.

16,773

Adaptable, fast automation for all

Pros of Gradle

  • Mature ecosystem with extensive plugin support
  • Powerful dependency management system
  • Widely adopted in the Java/Android development community

Cons of Gradle

  • Steeper learning curve, especially for complex builds
  • Can be slower for large projects due to configuration time
  • Groovy/Kotlin DSL syntax may be unfamiliar to some developers

Code Comparison

Gradle build script (build.gradle):

plugins {
    id 'java'
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    testImplementation 'junit:junit:4.13'
}

NUKE build script (Build.cs):

class Build : NukeBuild
{
    public static int Main() => Execute<Build>(x => x.Compile);

    Target Compile => _ => _
        .Executes(() =>
        {
            DotNetBuild(s => s
                .SetProjectFile(Solution)
                .SetConfiguration(Configuration));
        });
}

Summary

Gradle is a powerful, flexible build tool with a large ecosystem, while NUKE offers a more code-centric approach using C#. Gradle excels in complex, multi-language projects, whereas NUKE provides a familiar environment for .NET developers. The choice between them often depends on the project's specific requirements and the team's expertise.

4,281

Apache Maven core

Pros of Maven

  • Widely adopted and well-established in the Java ecosystem
  • Extensive plugin ecosystem for various build and deployment tasks
  • Centralized dependency management with Maven Central repository

Cons of Maven

  • XML-based configuration can be verbose and complex
  • Steeper learning curve for newcomers
  • Less flexible for custom build processes compared to script-based systems

Code Comparison

Maven (pom.xml):

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>my-app</artifactId>
  <version>1.0-SNAPSHOT</version>
</project>

Nuke (Build.cs):

class Build : NukeBuild
{
    public static int Main() => Execute<Build>(x => x.Compile);
    Target Compile => _ => _
        .Executes(() =>
        {
            DotNetBuild(s => s.SetProjectFile(Solution));
        });
}

Maven uses XML configuration for project setup and build processes, while Nuke employs C# code for defining build tasks. Nuke's approach offers more flexibility and type safety, but Maven's declarative style may be simpler for basic projects. Both tools aim to streamline build processes, but cater to different ecosystems and programming paradigms.

5,207

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.

Pros of MSBuild

  • Widely adopted and well-established in the .NET ecosystem
  • Extensive documentation and community support
  • Integrated with Visual Studio and other Microsoft tools

Cons of MSBuild

  • XML-based syntax can be verbose and difficult to read/write
  • Limited flexibility for complex build scenarios
  • Steeper learning curve for developers new to build systems

Code Comparison

MSBuild (XML):

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
  </PropertyGroup>
</Project>

Nuke (C#):

class Build : NukeBuild
{
    public static int Main() => Execute<Build>(x => x.Compile);
    Target Compile => _ => _
        .Executes(() => DotNetBuild(s => s
            .SetProjectFile(Solution)));
}

Key Differences

  • Nuke uses C# for build scripts, while MSBuild uses XML
  • Nuke provides a more developer-friendly, type-safe approach
  • MSBuild has deeper integration with Visual Studio
  • Nuke offers better IDE support for build script development
  • MSBuild has a larger ecosystem of tasks and extensions

Both tools have their strengths, with MSBuild being more established and Nuke offering a modern, code-first approach to build automation.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

The AKEless Build System for C#/.NET

Latest Release Latest Pre-Release Downloads License

Table of Contents

Elevator Pitch

Solid and scalable CI/CD pipelines are an essential pillar for being competitive and creating a great product. But why are most of us a little afraid of touching YAML files and don't even dare to look at build scripts? Much of this is because C# developers are spoiled with a great language and smart IDEs, and they don't like missing their buddy for code-completion, ease of debugging, refactorings, and code formatting.

NUKE brings your build automation to an even level with every other .NET project. How? It's a regular console application allowing all the OOP goodness! Besides, it solves many common problems in build automation, like parameter injection, path separator abstraction, access to solution and project models, and build step sharing across repositories. NUKE can also generate CI/CD configurations (YAML, etc.) that automatically parallelize build steps on multiple agents to optimize throughput!

For more information check out our documentation or visit our community ...

Slack Discord Twitter Mastodon

Example

Build Status

NUKE builds and tests itself on several CI/CD services, which helps to ensure a working integration with those systems. At the same time, the individual configuration files serve as examples for the generation experience:

Build ServerStatusPlatformConfiguration
TeamCityTeamCityWinsettings.kts
GitHub ActionsGitHub ActionsWin / Ubuntu / macOScontinuous.yml
GitLab CIGitLab CIUbuntu.gitlab-ci.yml
Azure PipelinesAzure PipelinesWin / Linux / macOSazure-pipelines.yml
AppVeyorAppVeyorWin / Ubuntuappveyor.yml

In Action

Sponsors

Thanks to all companies, organizations, and individuals who are sponsoring the further development of this project. Your support means a lot! 💙

Octopus Deploy

Amazon Web Services

Dangl-IT GmbH Leveling Up

Rodney Littles II Olga Nelioubov Daniel Valadas Anton Wieslander business//acts Petabridge Steven Kuhn

Stephan Müller David Driscoll Actipro Software Logan Laughlin Alex Sink Martin Gill Todor Todorov Derek Beattie Andrei Andreev patrik53 Cesare Caoduro Kirill Osenkov Archon Systems Inc. BITZER Electronics A/S

Technology Sponsors

Thanks to JetBrains for providing licenses for Rider and access to a TeamCity Cloud instance, which both make open-source development a real pleasure!

Thanks to SignPath for providing free code signing service and to the SignPath Foundation for a free code signing certificate.