All Projects → Itiviti → gradle-msbuild-plugin

Itiviti / gradle-msbuild-plugin

Licence: Apache-2.0 license
Gradle plugin for msbuild execution, supports C# project files for now

Programming Languages

groovy
2714 projects
C#
18002 projects

Projects that are alternatives of or similar to gradle-msbuild-plugin

EmptyLicensesLicx
Easy continuous integration of apps using third-party controls that rely on licenses.licx files
Stars: ✭ 57 (-43.56%)
Mutual labels:  msbuild, nuget
UnityAssemblies
Simple, forward-compatible references to ANY Unity DLL on ANY platform.
Stars: ✭ 65 (-35.64%)
Mutual labels:  msbuild, nuget
Xamarin.AzureCommunicationCalling
Xamarin iOS and Android binding libraries for Microsofts Azure Communication Services
Stars: ✭ 32 (-68.32%)
Mutual labels:  nuget
iTunesSearch
🎵 A .NET wrapper to the iTunes search API
Stars: ✭ 20 (-80.2%)
Mutual labels:  nuget
OAuthLogin
第三方平台联合登陆(facebook、微信、微博、QQ、Kakao)
Stars: ✭ 57 (-43.56%)
Mutual labels:  nuget
Elysium-Extra
Elysium Extra is a library that implements Metro style for Windows Presentation Foundation (WPF) applications. This Project is a very large add-on project built on top of the Elysium SDK.
Stars: ✭ 65 (-35.64%)
Mutual labels:  nuget
dapper-repositories
CRUD for Dapper
Stars: ✭ 523 (+417.82%)
Mutual labels:  nuget
WatsonWebsocket
A simple C# async websocket server and client for reliable transmission and receipt of data
Stars: ✭ 158 (+56.44%)
Mutual labels:  nuget
ScreenshotPlugin
A simple Screenshot plugin for Xamarin and Windows to get and save screenshot in yours apps.
Stars: ✭ 32 (-68.32%)
Mutual labels:  nuget
vkm
VK music downloader
Stars: ✭ 14 (-86.14%)
Mutual labels:  msbuild
OAuthLogin.AspNetCore
第三方平台联合登陆(facebook、微信、微博、QQ、Kakao)
Stars: ✭ 43 (-57.43%)
Mutual labels:  nuget
Paket.Unity3D
An extension for the Paket dependency manager that enables the integration of NuGet dependencies into Unity3D projects.
Stars: ✭ 42 (-58.42%)
Mutual labels:  nuget
VersionTrackingPlugin
Version Tracking Plugin for Xamarin and Windows
Stars: ✭ 62 (-38.61%)
Mutual labels:  nuget
net-Socket
A minimalist wrapper around System.Net.Sockets.Socket.
Stars: ✭ 21 (-79.21%)
Mutual labels:  nuget
TimeSpan2
Library extending the .NET TimeSpan structure to be comparable, serializable, and convertible, and to support localized string formatting and parsing.
Stars: ✭ 20 (-80.2%)
Mutual labels:  nuget
unzip
Tiny unzip helper class for .NET 3.5 Client Profile and Mono 2.10, written in pure C#.
Stars: ✭ 25 (-75.25%)
Mutual labels:  nuget
xamarin-bugly
A bugly SDK for Xamarin Android Bindings
Stars: ✭ 22 (-78.22%)
Mutual labels:  nuget
CoreFTP
An FTP library written in C# with no external dependencies
Stars: ✭ 99 (-1.98%)
Mutual labels:  nuget
SimpleGitVersion
Simple Git prerelease versioning integrated into SDK-based msbuild projects
Stars: ✭ 17 (-83.17%)
Mutual labels:  msbuild
PowerBuild
Integrate MSBuild into PowerShell pipeline.
Stars: ✭ 24 (-76.24%)
Mutual labels:  msbuild

📢 DEPRECATED

gradle-dotnet-plugin is now available for building projects via dotnet command line tool chains. The plugin supports running nunit, code coverage, nuget restore and push.

Gradle MsBuild Plugin Build status Build Status

This plugin allows to compile an MsBuild project. It also supports project file parsing, and some basic up-to-date checks to skip the build. I doubt it'll work on anything else than .csproj files right now, but adding support for more will be easy.

Plugin applies the base plugin automatically, and hooks msbuild output folders into the clean task process. Below tasks are provided by the plugin:

Prerequisites

  • .Net Framework 4.6

msbuild

Prior to execution, this task will parse the provided project file and gather all its inputs (which are added to the task inputs):

  • included files (Compile, EmbeddedResource, None, Content)
  • ProjectReference (recursively gathers its inputs) // TODO: should use outputs instead ?
  • References with a HintPath

OutputPath (e.g. bin/Debug) & Intermediary (e.g. obj/Debug) are set as output directories for the task.

To apply the plugin:

// Starting from gradle 2.1
plugins {
  id 'com.ullink.msbuild' version '3.15'
}

or

buildscript {
    repositories {
        url "https://plugins.gradle.org/m2/"
    }

    dependencies {
        classpath 'com.ullink.gradle:gradle-msbuild-plugin:3.15'
    }
}
apply plugin:'com.ullink.msbuild'

and configure by:

msbuild {
  // mandatory (one of those)
  solutionFile = 'my-solution.sln'
  projectFile = file('src/my-project.csproj')

  // MsBuild project name (/p:Project=...)
  projectName = project.name

  // Verbosity (/v:detailed, by default uses gradle logging level)
  verbosity = 'detailed'

  // targets to execute (/t:Clean;Rebuild, no default)
  targets = ['Clean', 'Rebuild']


  // MsBuild resolution
  // it support to search the msbuild tools from vswhere (by default it searches the latest)
  version = '15.0'
  // or define the exact msbuild dir explicity
  msbuildDir = 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\bin'


  // Below values can override settings from the project file

  // overrides project OutputPath
  destinationDir = 'build/msbuild/bin'

  // overrides project IntermediaryOutputPath
  intermediateDir = 'build/msbuild/obj'

  // Generates XML documentation file (from javadoc through custom DocLet)
  generateDoc = false

  // Other msbuild options can be set:
  // loggerAssembly, generateDoc, debugType, optimize, debugSymbols, configuration, platform, defineConstants ...

  // you can also provide properties by name (/p:SomeProperty=Value)
  parameters.SomeProperty = 'Value'

  // Or, if you use built-in msbuild parameters that aren't directly available here,
  // you can take advantage of the ExtensionAware interface
  ext["flp1"] = "LogFile=" + file("${project.name}.errors.log").path + ";ErrorsOnly;Verbosity=diag"
}

assemblyInfoPatcher {
  // mandatory if you want to patch your AssemblyInfo.cs/fs/vb

  // replaces the AssemblyVersion value in your AssemblyInfo file.
  // when explicitly set to blank, AssemblyVersion will not be updated and will keep the existing value in your AssemblyInfo file
  // TODO: not yet normalized, beware than .Net version must be X.Y.Z.B format, with Z/B optionals
  version = project.version + '.0.0'

  // replaces the AssemblyFileVersion value in your AssemblyInfo file.
  // defaults to above version, fewer restrictions on the format
  // when explicitly set to blank, AssemblyFileVersion will not be updated and will keep the existing value in your AssemblyInfo file
  fileVersion = version + '-Beta'

  // replaces the AssemblyInformationalVersion value in your AssemblyInfo file.
  // defaults to above version, fewer restrictions on the format
  // when explicitly set to blank, AssemblyInformationalVersion will not be updated and will keep the existing value in your AssemblyInfo file
  informationalVersion = version + '-Beta'

  // replaces the AssemblyDescription in the your AssemblyInfo file.
  // when set to blank (default), AssemblyDescription will not be updated and will keep the existing value in your AssemblyInfo file
  description = 'My Project Description'

  // default to msbuild main project (of solution)
  projects = [ 'MyProject1', 'MyProject2' ]
}

Custom tasks

You can create custom msbuild and assemblyInfoPatcher tasks like so:

import com.ullink.Msbuild
import com.ullink.AssemblyInfoVersionPatcher

task compileFoo(type: Msbuild) {
    projectFile = "Foo.vcxproj"
    // Other properties
}

task versionPatchFoo(type: AssemblyInfoVersionPatcher) {
    projects = ['Foo']
    // Other properties
}

See also

Gradle NuGet plugin - Allows to restore NuGet packages prior to building the projects with this plugin, and to pack&push nuget packages.

Gradle NUnit plugin - Allows to execute NUnit tests from CI (used with this plugin to build the projects prior to UT execution)

Gradle OpenCover plugin - Allows to execute the UTs through OpenCover for coverage reports.

You can see these 4 plugins in use on ILRepack project (build.gradle).

License

All these plugins are licensed under the Apache License, Version 2.0 with no warranty (expressed or implied) for any purpose.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].