Skip to content

Commit

Permalink
Improved formatting for better readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
ravibpatel committed Jan 4, 2024
1 parent b5562c7 commit 2cabc0e
Show file tree
Hide file tree
Showing 9 changed files with 215 additions and 232 deletions.
6 changes: 3 additions & 3 deletions ILRepack.Lib.MSBuild.Task/ILRepack.Config.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<KeyFile>$(ProjectDir)$(TargetName).snk</KeyFile>
</PropertyGroup>
<PropertyGroup>
<KeyFile>$(ProjectDir)$(TargetName).snk</KeyFile>
</PropertyGroup>
</Project>
84 changes: 42 additions & 42 deletions ILRepack.Lib.MSBuild.Task/ILRepack.Lib.MSBuild.Task.csproj
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<Version>2.0.22</Version>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<Version>2.0.22</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ILRepack" Version="2.0.22" GeneratePathProperty="true" />
<PackageReference Include="ILRepack.Lib" Version="2.0.22" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.8.3" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ILRepack" Version="2.0.22" GeneratePathProperty="true"/>
<PackageReference Include="ILRepack.Lib" Version="2.0.22"/>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.8.3"/>
</ItemGroup>

<ItemGroup>
<None Include="build\ILRepack.Lib.MSBuild.Task.nuspec" />
<None Include="ILRepack.Config.props" />
<None Include="ILRepack.Lib.MSBuild.Task.snk" />
<None Include="ILRepack.Lib.MSBuild.Task.targets" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<None Include="build\ILRepack.Lib.MSBuild.Task.nuspec"/>
<None Include="ILRepack.Config.props"/>
<None Include="ILRepack.Lib.MSBuild.Task.snk"/>
<None Include="ILRepack.Lib.MSBuild.Task.targets" CopyToOutputDirectory="PreserveNewest"/>
</ItemGroup>

<Target Name="Repack" AfterTargets="Build">
<Exec Command="&quot;$(ILRepack)&quot; /out:ILRepack.Lib.MSBuild.Task.dll ILRepack.Lib.MSBuild.Task.dll ILRepack.dll"
WorkingDirectory="$(OutDir)"
ConsoleToMSBuild="True" />
</Target>
<Target Name="Repack" AfterTargets="Build">
<Exec Command="&quot;$(ILRepack)&quot; /out:ILRepack.Lib.MSBuild.Task.dll ILRepack.Lib.MSBuild.Task.dll ILRepack.dll"
WorkingDirectory="$(OutDir)"
ConsoleToMSBuild="True"/>
</Target>

<Target Name="PrepareNupkgInfo">
<PropertyGroup>
<NuspecPath>$(MSBuildThisFileDirectory)build\ILRepack.Lib.MSBuild.Task.nuspec</NuspecPath>
<NupkgPath>$(OutDir)ILRepack.Lib.MSBuild.Task.$(Version).nupkg</NupkgPath>
</PropertyGroup>
</Target>
<Target Name="PrepareNupkgInfo">
<PropertyGroup>
<NuspecPath>$(MSBuildThisFileDirectory)build\ILRepack.Lib.MSBuild.Task.nuspec</NuspecPath>
<NupkgPath>$(OutDir)ILRepack.Lib.MSBuild.Task.$(Version).nupkg</NupkgPath>
</PropertyGroup>
</Target>

<Target Name="CreateNupkg"
Condition="$(Configuration) == 'Release'"
AfterTargets="Build"
DependsOnTargets="Repack;PrepareNupkgInfo"
Inputs="$(NuspecPath);$(TargetPath);$(MSBuildThisFileFullPath)"
Outputs="$(NupkgPath)">
<PackTask
PackItem="$(NuspecPath)"
NuspecFile="$(NuspecPath)"
NuspecProperties="version=$(Version)"
NuspecBasePath="$(OutDir)"
NuspecOutputPath="$(NuspecOutputPath)"
PackageOutputPath="$(OutDir)"
RestoreOutputPath="$(RestoreOutputPath)"
SymbolPackageFormat="snupkg" />
</Target>
<Target Name="CreateNupkg"
Condition="$(Configuration) == 'Release'"
AfterTargets="Build"
DependsOnTargets="Repack;PrepareNupkgInfo"
Inputs="$(NuspecPath);$(TargetPath);$(MSBuildThisFileFullPath)"
Outputs="$(NupkgPath)">
<PackTask
PackItem="$(NuspecPath)"
NuspecFile="$(NuspecPath)"
NuspecProperties="version=$(Version)"
NuspecBasePath="$(OutDir)"
NuspecOutputPath="$(NuspecOutputPath)"
PackageOutputPath="$(OutDir)"
RestoreOutputPath="$(RestoreOutputPath)"
SymbolPackageFormat="snupkg"/>
</Target>

</Project>
68 changes: 34 additions & 34 deletions ILRepack.Lib.MSBuild.Task/ILRepack.Lib.MSBuild.Task.targets
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<Project>
<Import Project="$(ProjectDir)ILRepack.Config.props" Condition="Exists('$(ProjectDir)ILRepack.Config.props')" />
<Import Project="$(ProjectDir)ILRepack.Config.props" Condition="Exists('$(ProjectDir)ILRepack.Config.props')"/>

<PropertyGroup>
<ILRepackTargetsFile Condition="$(ILRepackTargetsFile) == ''">$(ProjectDir)ILRepack.targets</ILRepackTargetsFile>
</PropertyGroup>
<PropertyGroup>
<ILRepackTargetsFile Condition="$(ILRepackTargetsFile) == ''">$(ProjectDir)ILRepack.targets</ILRepackTargetsFile>
</PropertyGroup>

<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)ILRepack.Lib.MSBuild.Task.dll" TaskName="ILRepack" />
<Import Project="$(ILRepackTargetsFile)" Condition="Exists('$(ILRepackTargetsFile)')" />
<Target Name="ILRepack" AfterTargets="Build" Condition="$(Configuration.Contains('Release')) and !Exists('$(ILRepackTargetsFile)')">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)$(TargetName)$(TargetExt)"/>
<InputAssemblies Include="$(OutputPath)*.dll" Exclude="$(OutputPath)$(TargetName)$(TargetExt)"/>
</ItemGroup>
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)ILRepack.Lib.MSBuild.Task.dll" TaskName="ILRepack"/>
<Import Project="$(ILRepackTargetsFile)" Condition="Exists('$(ILRepackTargetsFile)')"/>
<Target Name="ILRepack" AfterTargets="Build" Condition="$(Configuration.Contains('Release')) and !Exists('$(ILRepackTargetsFile)')">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)$(TargetName)$(TargetExt)"/>
<InputAssemblies Include="$(OutputPath)*.dll" Exclude="$(OutputPath)$(TargetName)$(TargetExt)"/>
</ItemGroup>

<ILRepack
Parallel="true"
DebugInfo="true"
AllowDuplicateResources="false"
InputAssemblies="@(InputAssemblies)"
TargetKind="SameAsPrimaryAssembly"
KeyFile="$(KeyFile)"
OutputFile="$(OutputPath)$(TargetName)$(TargetExt)"
/>
</Target>
<Target
AfterTargets="ILRepack"
Name="CleanReferenceCopyLocalPaths"
Condition="$(Configuration.Contains('Release')) and !Exists('$(ILRepackTargetsFile)') and '$(ClearOutputDirectory)' != 'False'">
<Delete Files="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')" />
<ItemGroup>
<Directories Include="$([System.IO.Directory]::GetDirectories('$(OutDir)%(DestinationSubDirectory)', '*', System.IO.SearchOption.AllDirectories))" />
<Directories>
<Files>$([System.IO.Directory]::GetFiles("%(Directories.Identity)", "*", System.IO.SearchOption.AllDirectories).get_Length())</Files>
</Directories>
</ItemGroup>
<RemoveDir Directories="@(Directories)" Condition="%(Files)=='0'" />
</Target>
<ILRepack
Parallel="true"
DebugInfo="true"
AllowDuplicateResources="false"
InputAssemblies="@(InputAssemblies)"
TargetKind="SameAsPrimaryAssembly"
KeyFile="$(KeyFile)"
OutputFile="$(OutputPath)$(TargetName)$(TargetExt)"
/>
</Target>
<Target
AfterTargets="ILRepack"
Name="CleanReferenceCopyLocalPaths"
Condition="$(Configuration.Contains('Release')) and !Exists('$(ILRepackTargetsFile)') and '$(ClearOutputDirectory)' != 'False'">
<Delete Files="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"/>
<ItemGroup>
<Directories Include="$([System.IO.Directory]::GetDirectories('$(OutDir)%(DestinationSubDirectory)', '*', System.IO.SearchOption.AllDirectories))"/>
<Directories>
<Files>$([System.IO.Directory]::GetFiles("%(Directories.Identity)", "*", System.IO.SearchOption.AllDirectories).get_Length())</Files>
</Directories>
</ItemGroup>
<RemoveDir Directories="@(Directories)" Condition="%(Files)=='0'"/>
</Target>
</Project>
Loading

0 comments on commit 2cabc0e

Please sign in to comment.