mirror of
https://github.com/Felitendo/jellyfin-plugin-lyrics.git
synced 2026-11-01 17:23:25 +01:00
The Jellyfin 12 packages target net10.0 only, so one DLL cannot serve both server generations. A JellyfinTarget switch (jf10/jf12) selects the framework, the Jellyfin package version and a JF10/JF12 symbol. Each release produces both artifacts with the same plugin version and adds two manifest entries, Jellyfin 12 first. Jellyfin filters entries by targetAbi before its stable sort by version, so manifest order decides which build a Jellyfin 12 server picks. jprm repo add drops entries sharing a version, so scripts/update_manifest.py writes them. The 10.11 build is pinned to the 10.11.0 floor again, so the whole 10.11.x line can install it. CA1873 is relaxed for the .NET 10 analyzers, and CI builds both targets.
57 lines
2.8 KiB
XML
57 lines
2.8 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<!-- Build target selector. The same source produces two artifacts, one per Jellyfin
|
|
line, never one DLL for both:
|
|
-p:JellyfinTarget=jf10 -> Jellyfin 10.11.x, .NET 9 (default)
|
|
-p:JellyfinTarget=jf12 -> Jellyfin 12.x, .NET 10
|
|
MSBuild also picks this up from the environment, which is how scripts/build-targets.py
|
|
drives jprm - jprm builds a fixed dotnet command line and cannot pass -p:. -->
|
|
<JellyfinTarget Condition="'$(JellyfinTarget)' == ''">jf10</JellyfinTarget>
|
|
|
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
<Nullable>enable</Nullable>
|
|
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
|
|
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
|
|
</PropertyGroup>
|
|
|
|
<!-- Jellyfin 10.11.x / .NET 9. Pinned to the 10.11.0 floor rather than the newest patch so the
|
|
artifact loads across the whole 10.11.x line: a newer host satisfies the lower reference,
|
|
while linking against a newer one breaks older hosts with a TypeLoadException (see #55). -->
|
|
<PropertyGroup Condition="'$(JellyfinTarget)' == 'jf10'">
|
|
<TargetFramework>net9.0</TargetFramework>
|
|
<JellyfinVersion>10.11.0</JellyfinVersion>
|
|
<HttpExtensionsVersion>9.0.4</HttpExtensionsVersion>
|
|
<!-- Explicit target symbol so code never has to infer the Jellyfin line from the TFM. -->
|
|
<DefineConstants>$(DefineConstants);JF10</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<!-- Jellyfin 12.x / .NET 10. The Jellyfin 12.0.0 packages ship lib/net10.0 only. -->
|
|
<PropertyGroup Condition="'$(JellyfinTarget)' == 'jf12'">
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<JellyfinVersion>12.0.0</JellyfinVersion>
|
|
<HttpExtensionsVersion>10.0.0</HttpExtensionsVersion>
|
|
<DefineConstants>$(DefineConstants);JF12</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<None Remove="Configuration\config.html" />
|
|
<EmbeddedResource Include="Configuration\config.html" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Jellyfin.Common" Version="$(JellyfinVersion)" />
|
|
<PackageReference Include="Jellyfin.Controller" Version="$(JellyfinVersion)" />
|
|
<PackageReference Include="Jellyfin.Model" Version="$(JellyfinVersion)" />
|
|
<PackageReference Include="Microsoft.Extensions.Http" Version="$(HttpExtensionsVersion)" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
|
|
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="All" />
|
|
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|