-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from nventive/dev/jela/global-json
Add support for global.json and `*Version` properties updates
- Loading branch information
Showing
11 changed files
with
315 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using NvGet.Entities; | ||
using NuGet.Packaging.Core; | ||
using NuGet.Versioning; | ||
using Uno.Extensions; | ||
|
||
#if WINDOWS_UWP | ||
using System.Text.RegularExpressions; | ||
using Windows.Data.Xml.Dom; | ||
using Windows.Storage; | ||
using XmlDocument = Windows.Data.Xml.Dom.XmlDocument; | ||
using XmlElement = Windows.Data.Xml.Dom.XmlElement; | ||
using XmlNode = Windows.Data.Xml.Dom.IXmlNode; | ||
#else | ||
using XmlDocument = System.Xml.XmlDocument; | ||
using XmlElement = System.Xml.XmlElement; | ||
using XmlNode = System.Xml.XmlNode; | ||
#endif | ||
|
||
namespace NvGet.Extensions | ||
{ | ||
public abstract class DocumentReference | ||
{ | ||
public abstract Task Save(CancellationToken ct, string path); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using NvGet.Entities; | ||
using NuGet.Packaging.Core; | ||
using NuGet.Versioning; | ||
using Uno.Extensions; | ||
|
||
#if WINDOWS_UWP | ||
using System.Text.RegularExpressions; | ||
using Windows.Data.Xml.Dom; | ||
using Windows.Storage; | ||
using XmlDocument = Windows.Data.Xml.Dom.XmlDocument; | ||
using XmlElement = Windows.Data.Xml.Dom.XmlElement; | ||
using XmlNode = Windows.Data.Xml.Dom.IXmlNode; | ||
#else | ||
using XmlDocument = System.Xml.XmlDocument; | ||
using XmlElement = System.Xml.XmlElement; | ||
using XmlNode = System.Xml.XmlNode; | ||
#endif | ||
|
||
namespace NvGet.Extensions | ||
{ | ||
public class JsonDocumentReference : DocumentReference | ||
{ | ||
public JsonDocumentReference(string contents) | ||
{ | ||
Contents = contents; | ||
} | ||
|
||
public string Contents { get; set; } | ||
|
||
public override async Task Save(CancellationToken ct, string path) | ||
{ | ||
System.IO.File.WriteAllText(path, Contents); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using NvGet.Entities; | ||
using NuGet.Packaging.Core; | ||
using NuGet.Versioning; | ||
using Uno.Extensions; | ||
|
||
#if WINDOWS_UWP | ||
using System.Text.RegularExpressions; | ||
using Windows.Data.Xml.Dom; | ||
using Windows.Storage; | ||
using XmlDocument = Windows.Data.Xml.Dom.XmlDocument; | ||
using XmlElement = Windows.Data.Xml.Dom.XmlElement; | ||
using XmlNode = Windows.Data.Xml.Dom.IXmlNode; | ||
#else | ||
using XmlDocument = System.Xml.XmlDocument; | ||
using XmlElement = System.Xml.XmlElement; | ||
using XmlNode = System.Xml.XmlNode; | ||
#endif | ||
|
||
namespace NvGet.Extensions | ||
{ | ||
public class XmlDocumentReference : DocumentReference | ||
{ | ||
public XmlDocumentReference(XmlDocument document) | ||
{ | ||
Document = document; | ||
} | ||
|
||
public XmlDocument Document { get; } | ||
|
||
public override async Task Save(CancellationToken ct, string path) | ||
{ | ||
await Document.Save(ct, path); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text.RegularExpressions; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using NuGet.Common; | ||
using NuGet.Packaging.Core; | ||
using NvGet.Contracts; | ||
using NvGet.Entities; | ||
using NvGet.Extensions; | ||
using NuGet.Versioning; | ||
using Uno.Extensions; | ||
using Newtonsoft.Json; | ||
|
||
namespace NvGet.Helpers | ||
{ | ||
public class GlobalJson | ||
{ | ||
[JsonProperty("msbuild-sdks")] | ||
public Dictionary<string, string> MSBuildSdks { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.