Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
89 lines (76 loc) · 4.79 KB
/
Copy pathDirectory.Build.props
File metadata and controls
89 lines (76 loc) · 4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<Project>
<PropertyGroup>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>
<!-- 定义 Linux -->
<PropertyGroup>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)' == 'true'">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<!-- ── 本仓库的发行版本号 ─────────────────────────────────────────────────
本仓库所有插件程序集共用它。CI 发版时用 -p:VelaPluginsVersion= 覆盖(取自 Release 标签)。
⚠️ 它**不是** SDK 版本 —— 那个在 Directory.Packages.props 的 PackageVersion 上
(本文件里没有 VelaSdkVersion,别再往这里加)。两条版本线各走各的:
SDK 发 2.0.0 不要求这批插件跟着发。
⚠️ 但它**就是**各插件 plugin.json 里的 version —— 本仓库是**统一发布列车**:
一次 Release,所有插件同上一个版本号(2026-08-22 起,见 bcddcde)。
plugin.json 的 version 决定 .vpx 文件名与宿主里显示的插件版本,由
scripts/Set-Version.ps1 统一写,**不要手改**:手改了 CI 的版本同步体检就红,
而且那个红灯只会告诉你"和 VelaPluginsVersion 不一致",不会告诉你是谁改错了哪边。
要发新版本就跑 `pwsh scripts/Set-Version.ps1 <版本>`,三类落点一起动。 -->
<VelaPluginsVersion Condition="'$(VelaPluginsVersion)' == ''">2.2.0</VelaPluginsVersion>
<!-- 去掉预发布后缀的数字版(AssemblyVersion/FileVersion 不接受后缀)。 -->
<VelaPluginsVersionCore>$([System.Text.RegularExpressions.Regex]::Replace($(VelaPluginsVersion), '-.*$', ''))</VelaPluginsVersionCore>
<Version>$(VelaPluginsVersion)</Version>
<AssemblyVersion>$(VelaPluginsVersionCore)</AssemblyVersion>
<FileVersion>$(VelaPluginsVersionCore)</FileVersion>
<!-- 不把 git 提交哈希拼进 InformationalVersion(默认会加 +sha 后缀)。 -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>
<!--
⚠️ NuGet 依赖的版本号**一律不在这里定义**。本仓库启用了 CPM,全部写在
Directory.Packages.props 的 PackageVersion 上,用 VS 的 NuGet 包管理器直接升即可。
两条相关纪律:
· 插件工程只引 VelaShell.PluginSdk.Build 作为契约、清单校验与 -t:PackVpx 的构建包;
UI 插件另行直接引用目标宿主的 Avalonia 编译与 AXAML 资产;
· 构建 UI 的插件必须直接引用目标宿主的 Avalonia 编译资产,并排除 runtime 资产。
Avalonia 及 AvaloniaEdit 的版本由下面的目标宿主属性声明,构建期同时核对
测试宿主的中央包版本和实际解析引用。
SDK 只从 nuget.org 来,本仓库没有 nuget.config、也没有本地源:要用还没发布的契约,
等 SDK 发版后抬 Directory.Packages.props(见 AGENTS.md「构建与打包」)。
-->
<PropertyGroup>
<!-- Target-host package versions; the SDK intentionally does not own these pins. -->
<VelaAvaloniaVersion Condition="'$(VelaAvaloniaVersion)' == ''">12.2.0</VelaAvaloniaVersion>
<VelaAvaloniaEditVersion Condition="'$(VelaAvaloniaEditVersion)' == ''">12.0.0</VelaAvaloniaEditVersion>
</PropertyGroup>
<PropertyGroup>
<Authors>joesdu</Authors>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/VelaShell/velashell-plugins</RepositoryUrl>
<GenerateAssemblyConfigurationAttribute>True</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>True</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>True</GenerateAssemblyProductAttribute>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<!-- 本仓库不出 NuGet 包:插件的分发形态是 .vpx 与随应用分发的 plugins/ 目录。 -->
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net11.0'">
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<Features>$(Features);runtime-async=on</Features>
<NoWarn>$(NoWarn);CA2252;SYSLIB5007;</NoWarn>
</PropertyGroup>
<PropertyGroup>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);IDE0047;</NoWarn>
</PropertyGroup>
<PropertyGroup>
<VelaRepoRoot>$(MSBuildThisFileDirectory)</VelaRepoRoot>
<VelaArtifactsDir Condition="'$(VelaArtifactsDir)' == ''">$(VelaRepoRoot)artifacts</VelaArtifactsDir>
</PropertyGroup>
</Project>