Code Monkey home page Code Monkey logo

Comments (11)

gluck avatar gluck commented on July 20, 2024

Hi James,
What do you mean by that ?
NugetPack doesn't make use or rely on Msbuild (but if gradle-msbuild plugin is applied and used, it gets its default values from the gradle-msbuild setup)

Thx

from gradle-nuget-plugin.

JamesPoli avatar JamesPoli commented on July 20, 2024

from gradle-nuget-plugin.

gluck avatar gluck commented on July 20, 2024

Your proposal sounds about right, we could add the MSBuildVersion param (to all nuget tasks or only some of them ?), and add a default mapping to the one used by gradle-msbuild.

Interested in picking up the task ? I myself have never had the need for this param, and the only related link I found doesn't make it clear what value this parameter takes.

Thx.

from gradle-nuget-plugin.

JamesPoli avatar JamesPoli commented on July 20, 2024

Sure, I'll try to implement the task; that way I can test it. I'll review the command's again but I believe only the pack and restore support the msbuildversion. Ah, I found that update also supports the option.
Regards, Jim

from gradle-nuget-plugin.

JamesPoli avatar JamesPoli commented on July 20, 2024

Francois,
I've started work on this effort. FWIW, to test, I made several changes to the NuGetRestore task for a new msBuildVersion property. But, alas, defaulting the msBuildVersion to the MsBuild's version property doesn't appear to be working.? In the task graph, the NuGetRestore task is running before the MsBuild task, thus the msBuildVersion property is always null. Perhaps, my idea wasn't so great after all? Possibly, I need some special Gradle magic to get this working? Anyway, since my plugin simply wraps your Nuget and MsBuild tasks, I was able to set the NuGetRestore msBuildVersion property in a private task beforehand, thus getting the behavior I needed. I'll finish NuGetPack. Since you don't have a NuGetUpdate task I won't worry about that. I'll continue to code and test, then push and do a pull request. Let me know if that sounds alright.
Regards, Jim

from gradle-nuget-plugin.

gluck avatar gluck commented on July 20, 2024

The task graph shouldn't matter, if version was set on msbuild task, you can use it right away.

Note that if it wasn't set explicitely in the gradle build, then it'll resolve to the latest when executing the msbuild task, in that case you can't get the version used, but you shouldn't need to (if msbuild is set to using the latest, nuget should do the same, meaning the version shouldn't be set explicitly).

Feel free to push your changes as a PR even if not finished yet, we can discuss on that.

from gradle-nuget-plugin.

JamesPoli avatar JamesPoli commented on July 20, 2024

Looking closer at our code, we set the version at runtime prior to the msbuild task running which matches your explanation, thanks. I'll go ahead and add back in the code that uses the msbuild version if it's set. I've got some more testing to do, then I'll push. How do you want me to push? In a separate branch or in a fork?

from gradle-nuget-plugin.

JamesPoli avatar JamesPoli commented on July 20, 2024

Sorry, Francois, it's taking a while, the code is complete; I'm just waiting for legal approval from SAS to commit it. Should be approved this week. Jim

from gradle-nuget-plugin.

JamesPoli avatar JamesPoli commented on July 20, 2024

Ok Francois, created PR. Jim

from gradle-nuget-plugin.

JamesPoli avatar JamesPoli commented on July 20, 2024

What's the process to get this released?

from gradle-nuget-plugin.

ngyukman avatar ngyukman commented on July 20, 2024

released in 2.16

from gradle-nuget-plugin.

Related Issues (20)

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.