在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Itiviti/gradle-nuget-plugin开源软件地址(OpenSource Url):https://github.com/Itiviti/gradle-nuget-plugin开源编程语言(OpenSource Language):Groovy 100.0%开源软件介绍(OpenSource Introduction):Gradle NuGet PluginThis plugin allows to execute NuGet.exe from a gradle build. It also supports pack & push commands through built-in tasks, nugetPack, nugetPush & nugetRestore. nugetPackYou can see this plugin being used for real on il-repack project. (together with msbuild one) nugetSpecThe task is to generate nuspec file by custom configuration. Sample usage: buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "com.ullink.gradle:gradle-nuget-plugin:2.17"
}
}
apply plugin: 'nuget'
nuget {
// nuget.exe version to use, defaults to 4.9.4
// there are three different mutually excluded options for Nuget binary downloading:
// first: define nuget version for download.
// available versions can be found [here](https://dist.nuget.org/index.html)
version = '4.9.4'
// second - set nuget location, which will be used for download:
nugetExePath = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
// third: define nuget executable file, which is already downloaded previously:
nugetExePath = "C:\\Tools\\Nuget\\nuget.exe"
}
nugetSpec {
// Array, Map and Closure could be used to generate nuspec XML, for details please check NuGetSpecTest
nuspec = [
metadata: [
title: 'project title',
authors: 'Francois Valdy',
// id: default is project.name
// version: default is project.version
// description: default is project.description
// ...
]
files: [
{ file (src: 'somefile1', target: 'tools') },
{ file (src: 'somefile2', target: 'tools') }
]
]
} nugetRestoreNuget restore is used to retrieve missing packages before starting the build. Sample usage: nugetRestore {
solutionDirectory = path\to\project
packagesDirectory = location\for\package\restore
} Where
nugetSourcesNuget sources is used to add, remove, update, enable, disable nuget feeds. Sample usage: nugetSources {
operation = 'add'
sourceName = 'localNuGetFeed'
sourceUrl = 'http://foo.com'
username = 'optional username'
password = 'optional password'
configFile = 'nuget.config'
} Where
See alsoGradle Msbuild plugin - Allows to build VS projects & solutions. 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). LicenseAll these plugins are licensed under the Apache License, Version 2.0 with no warranty (expressed or implied) for any purpose. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论