Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

<!-- Common Package Properties -->
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Authors>James Willock</Authors>
<Owners>James Willock</Owners>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit</PackageProjectUrl>
<PackageIcon>MaterialDesign.Icon.png</PackageIcon>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/releases</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
Expand All @@ -30,4 +41,10 @@
<Using Include="System.Windows.Input" />
<Using Include="System.Windows.Markup" />
</ItemGroup>

<!-- Common Package Content -->
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)build\MaterialDesign.Icon.png" Pack="true" PackagePath="\" />
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
38 changes: 9 additions & 29 deletions build/BuildNugets.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,22 @@ $year = [System.DateTime]::Now.ToString("yyyy")
$copyright = "Copyright $year James Willock/Mulholland Software Ltd"
$configuration = "Release"

function Update-Versions {
function New-DotNetPackage {
param (
[string]$Path
)
$Path = Resolve-Path $Path
[xml] $xml = Get-Content $Path

foreach ($dependency in $xml.package.metadata.dependencies.group.dependency) {
if ($dependency.id -eq "MaterialDesignColors") {
$dependency.version = $MDIXColorsVersion
}
elseif ($dependency.id -eq "MaterialDesignThemes") {
$dependency.version = $MDIXVersion
}
}
$xml.Save($Path)
}

function New-Nuget {
param (
[string]$NuSpecPath,
[string]$ProjectPath,
[string]$Version
)

$NuSpecPath = Resolve-Path $NuSpecPath
nuget pack "$NuSpecPath" -version "$Version" -Properties "Configuration=$configuration;Copyright=$copyright"
$ProjectPath = Resolve-Path $ProjectPath
Write-Host "Packing $ProjectPath with version $Version"
dotnet pack "$ProjectPath" -c $configuration -p:PackageVersion="$Version" -p:Copyright="$copyright" --no-build
}

Push-Location "$(Join-Path $PSScriptRoot "..")"

Update-Versions .\src\MaterialDesignColors.Wpf\MaterialDesignColors.nuspec
Update-Versions .\src\MaterialDesignThemes.Wpf\MaterialDesignThemes.nuspec
Update-Versions .\src\MaterialDesignThemes.MahApps\MaterialDesignThemes.MahApps.nuspec

New-Nuget .\src\MaterialDesignColors.Wpf\MaterialDesignColors.nuspec $MDIXColorsVersion
New-Nuget .\src\MaterialDesignThemes.Wpf\MaterialDesignThemes.nuspec $MDIXVersion
New-Nuget .\src\MaterialDesignThemes.MahApps\MaterialDesignThemes.MahApps.nuspec $MDIXMahAppsVersion
# Pack the projects
New-DotNetPackage .\src\MaterialDesignColors.Wpf\MaterialDesignColors.Wpf.csproj $MDIXColorsVersion
New-DotNetPackage .\src\MaterialDesignThemes.Wpf\MaterialDesignThemes.Wpf.csproj $MDIXVersion
New-DotNetPackage .\src\MaterialDesignThemes.MahApps\MaterialDesignThemes.MahApps.csproj $MDIXMahAppsVersion

Pop-Location
7 changes: 7 additions & 0 deletions src/MaterialDesignColors.Wpf/MaterialDesignColors.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<Description>Material Design in XAML Toolkit - Colors</Description>
<Version>$(MDIXColorsVersion)</Version>
<AssemblyVersion>$(MDIXColorsVersion)</AssemblyVersion>

<!-- Package Properties -->
<PackageId>MaterialDesignColors</PackageId>
<Title>Material Design Colors XAML Resources</Title>
<PackageDescription>ResourceDictionary instances containing standard Google Material Design swatches, for inclusion in a XAML application.</PackageDescription>
<PackageTags>WPF XAML Material Design Colour Color UI UX</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand All @@ -19,4 +25,5 @@
<_Parameter2>$(MDIXColorsVersion)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
<Version>$(MDIXMahAppsVersion)</Version>
<AssemblyVersion>$(MDIXMahAppsVersion)</AssemblyVersion>
<UseWPF>true</UseWPF>

<!-- Package Properties -->
<PackageId>MaterialDesignThemes.MahApps</PackageId>
<Title>Material Design Themes XAML Resources For MahApps Controls</Title>
<PackageDescription>ResourceDictionary instances containing Material Design templates and styles for WPF controls in the MahApps library.</PackageDescription>
<PackageTags>WPF XAML MahApps Material Design Theme Colour Color UI UX</PackageTags>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\MaterialDesignColors.Wpf\MaterialDesignColors.Wpf.csproj" />
Expand All @@ -18,4 +24,5 @@
<ItemGroup>
<PackageReference Include="MahApps.Metro" />
</ItemGroup>

</Project>
15 changes: 15 additions & 0 deletions src/MaterialDesignThemes.Wpf/MaterialDesignThemes.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
<AssemblyVersion>$(MDIXVersion)</AssemblyVersion>
<NoWarn>CS1591;CS1574</NoWarn>
<DocumentationFile>bin\$(Configuration)\MaterialDesignThemes.Wpf.xml</DocumentationFile>

<!-- Package Properties -->
<PackageId>MaterialDesignThemes</PackageId>
<Title>Material Design Themes XAML Resources</Title>
<PackageDescription>ResourceDictionary instances containing Material Design templates and styles for WPF controls in .NET.</PackageDescription>
<PackageTags>WPF XAML Material Design Theme Colour Color UI UX</PackageTags>
</PropertyGroup>
<ItemGroup>
<Resource Include="Resources\Roboto\*.ttf" />
Expand Down Expand Up @@ -42,4 +48,13 @@
<_Parameter2>$(MDIXVersion)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>

<!-- Package Content -->
<ItemGroup>
<!-- Common content inherited from Directory.Build.props -->
<!-- Project-specific content -->
<None Include="Resources\Roboto\*.ttf" Pack="true" PackagePath="build\Resources\Roboto" />
<None Include="MaterialDesignThemes.targets" Pack="true" PackagePath="build" />
<None Include="VisualStudioToolsManifest.xml" Pack="true" PackagePath="tools" />
</ItemGroup>
</Project>
Loading