Skip to content
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

Use fody to replace ILRepack #420

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,6 @@ inspectcode
/BenchmarkDotNet.Artifacts

*.GeneratedMSBuildEditorConfig.editorconfig

# Temp file for Fody merge
FodyWeavers.xsd
6 changes: 6 additions & 0 deletions osu.Game.Rulesets.Karaoke/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ILMerge>
<FullImport>true</FullImport>
<IncludeAssemblies>LanguageDetection|Octokit|osu.Framework.KaraokeFont|osu.Framework.Microphone|NWaves|LyricMaker|NicoKaraParser|SixLabors.ImageSharp.Drawing|WanaKanaSharp|Zipangu</IncludeAssemblies>
</ILMerge>
</Weavers>
34 changes: 4 additions & 30 deletions osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<RootNamespace>osu.Game.Rulesets.Karaoke</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ILRepack.MSBuild.Task" Version="2.0.13" />
<PackageReference Include="LanguageDetection.karaoke-dev" Version="1.3.3-alpha" />
<PackageReference Include="Octokit" Version="0.50.0" />
<PackageReference Include="osu.Framework.KaraokeFont" Version="2022.214.0" />
Expand All @@ -31,37 +30,12 @@
<_Parameter1>$(AssemblyName).Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<!--We need to copy framework assembly to the output, else ILRepack will fail to resolve framework assembly.-->
<PropertyGroup Condition=" '$(Configuration)'=='Release' ">
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<Target Name="ILRepack" AfterTargets="Build" Condition=" '$(Configuration)'=='Release' ">
<PropertyGroup>
<WorkingDirectory>$(MSBuildThisFileDirectory)bin\$(Configuration)\$(TargetFramework)</WorkingDirectory>
</PropertyGroup>

<ItemGroup>
<InputAssemblies Include="LanguageDetection.dll" />
<InputAssemblies Include="Octokit.dll" />
<InputAssemblies Include="osu.Framework.KaraokeFont.dll" />
<InputAssemblies Include="osu.Framework.Microphone.dll" />
<InputAssemblies Include="NWaves.dll" />
<InputAssemblies Include="LyricMaker.dll" />
<InputAssemblies Include="NicoKaraParser.dll" />
<InputAssemblies Include="SixLabors.Fonts.dll" />
<InputAssemblies Include="SixLabors.ImageSharp.Drawing.dll" />
<InputAssemblies Include="WanaKanaSharp.dll" />
<InputAssemblies Include="Zipangu.dll" />
</ItemGroup>

<ItemGroup>
<InternalizeExcludeAssemblies Include="osu.Game.dll" />
<InternalizeExcludeAssemblies Include="osu.Framework.dll" />
</ItemGroup>

<ILRepack OutputType="$(OutputType)" MainAssembly="$(AssemblyName).dll" OutputAssembly="$(AssemblyName).Packed.dll" InputAssemblies="@(InputAssemblies)" InternalizeExcludeAssemblies="@(InternalizeExcludeAssemblies)" WorkingDirectory="$(WorkingDirectory)" />

</Target>
<ItemGroup Condition="'$(Configuration)'=='Release'">
<PackageReference Include="Fody" Version="6.6.0" PrivateAssets="All" />
<PackageReference Include="ILMerge.Fody" Version="1.22.0" PrivateAssets="All" />
</ItemGroup>
</Project>