{"id":13734257,"url":"https://github.com/Itiviti/gradle-nuget-plugin","last_synced_at":"2025-05-08T10:31:12.945Z","repository":{"id":5744164,"uuid":"6956593","full_name":"Itiviti/gradle-nuget-plugin","owner":"Itiviti","description":"Executes NuGet from a gradle build","archived":false,"fork":false,"pushed_at":"2023-04-27T13:25:49.000Z","size":354,"stargazers_count":22,"open_issues_count":16,"forks_count":29,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-24T10:03:20.021Z","etag":null,"topics":["gradle","gradle-nuget-plugin","msbuild","nuget"],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Itiviti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2012-12-01T16:55:57.000Z","updated_at":"2024-04-19T15:46:30.000Z","dependencies_parsed_at":"2024-01-06T14:50:07.066Z","dependency_job_id":null,"html_url":"https://github.com/Itiviti/gradle-nuget-plugin","commit_stats":null,"previous_names":["ullink/gradle-nuget-plugin"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Itiviti%2Fgradle-nuget-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Itiviti%2Fgradle-nuget-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Itiviti%2Fgradle-nuget-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Itiviti%2Fgradle-nuget-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Itiviti","download_url":"https://codeload.github.com/Itiviti/gradle-nuget-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804206,"owners_count":21806769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gradle","gradle-nuget-plugin","msbuild","nuget"],"created_at":"2024-08-03T03:00:53.942Z","updated_at":"2025-05-08T10:31:12.663Z","avatar_url":"https://github.com/Itiviti.png","language":"Groovy","funding_links":[],"categories":["Plugins"],"sub_categories":["Dependency management"],"readme":"# Gradle NuGet Plugin [![Build status](https://ci.appveyor.com/api/projects/status/ua9pbginenbf1b1u/branch/master?svg=true)](https://ci.appveyor.com/project/gluck/gradle-nuget-plugin/branch/master) [![Build Status](https://travis-ci.org/Ullink/gradle-nuget-plugin.svg?branch=master)](https://travis-ci.org/Ullink/gradle-nuget-plugin)\r\n\r\nThis plugin allows to execute NuGet.exe from a gradle build.\r\nIt also supports pack \u0026 push commands through built-in tasks, nugetPack, nugetPush \u0026 nugetRestore.\r\n\r\n## nugetPack\r\n\r\nYou can see this plugin being used for real on [il-repack](https://github.com/gluck/il-repack) project.\r\n(together with msbuild one)\r\n\r\n## nugetSpec\r\n\r\nThe task is to generate nuspec file by custom configuration.\r\n\r\nSample usage:\r\n\r\n```groovy\r\nbuildscript {\r\n    repositories {\r\n      mavenCentral()\r\n    }\r\n\r\n    dependencies {\r\n        classpath \"com.ullink.gradle:gradle-nuget-plugin:2.17\"\r\n    }\r\n}\r\n\r\napply plugin: 'nuget'\r\n\r\nnuget {\r\n    // nuget.exe version to use, defaults to 4.9.4\r\n\r\n    // there are three different mutually excluded options for Nuget binary downloading:\r\n\r\n    // first: define nuget version for download.\r\n    // available versions can be found [here](https://dist.nuget.org/index.html)\r\n    version = '4.9.4'\r\n\r\n    // second - set nuget location, which will be used for download:\r\n    nugetExePath = \"https://dist.nuget.org/win-x86-commandline/latest/nuget.exe\"\r\n\r\n    // third: define nuget executable file, which is already downloaded previously:\r\n    nugetExePath = \"C:\\\\Tools\\\\Nuget\\\\nuget.exe\"\r\n}\r\n\r\nnugetSpec {\r\n    // Array, Map and Closure could be used to generate nuspec XML, for details please check NuGetSpecTest\r\n    nuspec = [\r\n        metadata: [\r\n            title:          'project title',\r\n            authors:        'Francois Valdy',\r\n            // id:          default is project.name\r\n            // version:     default is project.version\r\n            // description: default is project.description\r\n            // ...\r\n        ]\r\n        files: [\r\n            { file (src: 'somefile1', target: 'tools') },\r\n            { file (src: 'somefile2', target: 'tools') }\r\n        ]\r\n    ]\r\n}\r\n```\r\n\r\n## nugetRestore\r\n\r\nNuget restore is used to retrieve missing packages before starting the build.\r\n\r\nSample usage:\r\n\r\n```groovy\r\nnugetRestore {\r\n    solutionDirectory = path\\to\\project\r\n    packagesDirectory = location\\for\\package\\restore\r\n}\r\n```\r\n\r\nWhere\r\n - solutionDirectory - could either contain the .sln file or the repositories.config file\r\n - packagesDirectory - used only if a folder with repositories.config is used\r\n\r\n## nugetSources\r\n\r\nNuget sources is used to add, remove, update, enable, disable nuget feeds.\r\n\r\nSample usage:\r\n\r\n```groovy\r\nnugetSources {\r\n    operation = 'add'\r\n    sourceName = 'localNuGetFeed'\r\n    sourceUrl = 'http://foo.com'\r\n    username = 'optional username'\r\n    password = 'optional password'\r\n    configFile = 'nuget.config'\r\n}\r\n```\r\n\r\nWhere\r\n - operation - could be add, remove, update, enable, disable and list\r\n - sourceName - name of the nuget feed\r\n - sourceUrl - url of the nuget feed\r\n - username - optional username for nuget sources that require http basic authentication\r\n - password - optional password for nuget sources that require http basic authentication\r\n - configFile - optional NuGet.config file to modify\r\n\r\n\r\n# See also\r\n\r\n[Gradle Msbuild plugin](https://github.com/Ullink/gradle-msbuild-plugin) - Allows to build VS projects \u0026 solutions.\r\n\r\n[Gradle NUnit plugin](https://github.com/Ullink/gradle-nunit-plugin) - Allows to execute NUnit tests from CI (used with this plugin to build the projects prior to UT execution)\r\n\r\n[Gradle OpenCover plugin](https://github.com/Ullink/gradle-opencover-plugin) - Allows to execute the UTs through OpenCover for coverage reports.\r\n\r\nYou can see these 4 plugins in use on [ILRepack](https://github.com/gluck/il-repack) project ([build.gradle](https://github.com/gluck/il-repack/blob/master/build.gradle)).\r\n\r\n# License\r\n\r\nAll these plugins are licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) with no warranty (expressed or implied) for any purpose.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FItiviti%2Fgradle-nuget-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FItiviti%2Fgradle-nuget-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FItiviti%2Fgradle-nuget-plugin/lists"}