-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sample for External dependencies and update Project Generator #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing jumps out at me!
I like the rework of the export code into IProjectExporter
* Misc cleanup, also refactor a bit more csprojectinfo and exporter relationship * Rewrote the template process for XML, haven't replaced existing process yet. * Various perf improvements, also removed need to create PackageCopy * Implemented TextFileTemplate * A few more minor changes * A bit of cleanup * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Exporters/IProjectExporter.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Templates/Xml/XmlCommentTemplateToken.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Templates/TemplateReplacementSet.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Templates/ITemplatePart.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Exporters/TemplatedProjectExporter.cs Co-Authored-By: Kurtis <[email protected]> * Removing commented code
* Misc cleanup, also refactor a bit more csprojectinfo and exporter relationship * Rewrote the template process for XML, haven't replaced existing process yet. * Various perf improvements, also removed need to create PackageCopy * Implemented TextFileTemplate * A few more minor changes * A bit of cleanup * Added support for including on soure file locations and excluding on source file locations * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Exporters/IProjectExporter.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Templates/Xml/XmlCommentTemplateToken.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Templates/TemplateReplacementSet.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Templates/ITemplatePart.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Exporters/TemplatedProjectExporter.cs Co-Authored-By: Kurtis <[email protected]> * Removing commented code
* Misc cleanup, also refactor a bit more csprojectinfo and exporter relationship * Rewrote the template process for XML, haven't replaced existing process yet. * Various perf improvements, also removed need to create PackageCopy * Implemented TextFileTemplate * A few more minor changes * A bit of cleanup * Added support for including on soure file locations and excluding on source file locations * First iteration of updating project structure * Updated the structure, and ensured standard scenarios still work * Added an example of external nuget package reference * Added the NuGet dependency example that has minimum requirement of MSBuildForUnity * Adding settings json file * Fixed an error * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Templates/TemplateReplacementSet.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Templates/Xml/XmlCommentTemplateToken.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Templates/ITemplatePart.cs Co-Authored-By: Kurtis <[email protected]> * Update Source/MSBuildTools.Unity/Packages/com.microsoft.msbuildforunity/Editor/ProjectGenerator/Scripts/Exporters/IProjectExporter.cs Co-Authored-By: Kurtis <[email protected]> * Updating templates with comments * Minor updates
* Udpating the sample to be a simple nuget dependency * Added Readme for the simple nuget package sample
* Updating project generator to support Dependencies project * Checking in initial version of the sample * Exclude dependencies folder from participating in contributing plugins to the csproject files generated * Added the generated projects that can be checked-in * Made use of JSOn * Trying to get external reference to be included * Fixed up most of the things needed to make supported integrated dependencies * More fixes * Completed the Readme.md * Fixing switching platforms * Updated documentaiton * Updating project generator to support Dependencies project * Checking in initial version of the sample * Exclude dependencies folder from participating in contributing plugins to the csproject files generated * Added the generated projects that can be checked-in * Made use of JSOn * Sign dlls and package (#39) This change updates the NuGet package build to sign MSBuildForUnity.dll as well as the NuGet package itself. Break the existing build step into two separate steps (build and package) Add a step for signing binaries between building and packaging Add a step for signing the package * Add NuGet package badge and link to readme (#41) * Trying to get external reference to be included * Sign third party components (#47) The primary change here is to sign third party components (Newtonsoft.Json and Mono.Cecil) and include them in the NuGet package: - Update MSBuildForUnity.csproj to ensure third party components are copied to the output directory (so we can sign them), and make sure they are then packaged up with the NuGet package. - Update the code signing steps to sign the third party components. I also made a couple related changes:: - Replace the Mono.Cecil submodule with the actual NuGet package (an updated package was published a few days ago with the bug fixes we needed). - Add the ComponentGovernanceComponentDetection step to check for third party components with any known problems (we shouldn't ship such components). * Move GenerateAssetId into a custom C# task, since CodeTaskFactory is not compatible with dotnet (#48) * Fixed up most of the things needed to make supported integrated dependencies * More fixes * Completed the Readme.md * Fixing switching platforms * Updated documentaiton * Updating project generator to support Dependencies project * Checking in initial version of the sample * Exclude dependencies folder from participating in contributing plugins to the csproject files generated * Added the generated projects that can be checked-in * Made use of JSOn * Trying to get external reference to be included * rebase * Sign third party components (#47) The primary change here is to sign third party components (Newtonsoft.Json and Mono.Cecil) and include them in the NuGet package: - Update MSBuildForUnity.csproj to ensure third party components are copied to the output directory (so we can sign them), and make sure they are then packaged up with the NuGet package. - Update the code signing steps to sign the third party components. I also made a couple related changes:: - Replace the Mono.Cecil submodule with the actual NuGet package (an updated package was published a few days ago with the bug fixes we needed). - Add the ComponentGovernanceComponentDetection step to check for third party components with any known problems (we shouldn't ship such components). * Fixed up most of the things needed to make supported integrated dependencies * More fixes * Completed the Readme.md * Fixing switching platforms * Updated documentaiton * Updating project generator to support Dependencies project * Checking in initial version of the sample * Added the generated projects that can be checked-in * Trying to get external reference to be included * Fixed up most of the things needed to make supported integrated dependencies * More fixes * Completed the Readme.md * Fixing switching platforms * Updated documentaiton * minor fixes * One more change * Responding to Kurtis' comments
...buildforunity/Editor/ProjectGenerator/MSBuildTemplates/MSBuildForUnity.Common.props.template
Show resolved
Hide resolved
Samples/SimpleNuGetDependency.Unity/Assets/NewtonsoftDependency/NewtonsoftDependency.csproj
Show resolved
Hide resolved
Samples/SimpleNuGetDependency.Unity/Assets/NewtonsoftDependency/NewtonsoftDependency.csproj
Show resolved
Hide resolved
Samples/SimpleNuGetDependency.Unity/Assets/NewtonsoftDependency/NuGet.config
Outdated
Show resolved
Hide resolved
...nity/Packages/com.microsoft.msbuildforunity/Editor/ProjectBuilder/MSBuildProjectReference.cs
Outdated
Show resolved
Hide resolved
@@ -72,20 +79,20 @@ public string ProjectPath | |||
} | |||
|
|||
// Determine the absolute path of the MSBuild project (based on the projectPath being relative to the MSBuildProjectReference asset). | |||
if (!string.IsNullOrEmpty(this.projectPath)) | |||
if (!string.IsNullOrEmpty(projectPath)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the this.
qualifier? Now it is hard to tell at a glance whether this is a member variable or local variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was automatic formatting. I can add this back if you like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preferably yes. We don't have consistent styling in the code right now, but I would prefer to qualify in at least the code I contribute to because I find it much easier to quickly reason about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definetly, sorry, it's my automatic rules. Will fix this file.
|
||
<Version>$(MajorVersion).$(MinorVersion).$(RevisionVersion)</Version> | ||
<!-- Version is based on Major.Minor.Revision as defined above, however, in a lab BUILD_BUILDID will be set so we pull in that as the pre-release version. --> | ||
<Version Condition="'$(BUILD_BUILDID)' != ''">$(Version)-$(BUILD_BUILDID)</Version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are switching the NuGet package version to use the pre-release suffix, then you should remove the NuGet package badge from the top level readme.md as ADO does not provide package badges for pre-release builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could I just update it to show latest stable when I go ahead and release 0.8.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few more comments, but this looks close, so signing off to make sure you aren't blocked on me.
This change is currently a preview of the current state of the feature, so far this includes:
-- The C# file can be checked in and won't be overwritten