mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
- 新增 AdditionalTextGeneratorTestDriver 用于源生成器测试 - 添加 AutoLoadAttribute 特性支持 AutoLoad 类型映射 - 扩展项目构建目标,支持自定义 project.godot 路径验证 - 创建完整 Godot 集成教程文档,涵盖节点生命周期、信号系统等功能 - 添加源代码生成器测试项目配置和相关依赖包引用
41 lines
2.4 KiB
XML
41 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||
<!-- This file is automatically generated by the NuGet package -->
|
||
<!-- It ensures that the source generators are properly registered during build -->
|
||
|
||
<PropertyGroup>
|
||
<!--
|
||
默认收集消费者项目根目录下的 project.godot,
|
||
让 Godot 项目元数据生成能力在常规 Godot C# 工程里开箱即用。
|
||
-->
|
||
<GFrameworkGodotProjectFile Condition="'$(GFrameworkGodotProjectFile)' == ''">project.godot</GFrameworkGodotProjectFile>
|
||
<!--
|
||
当前生成器按文件名识别 project.godot,因此允许调整相对路径,
|
||
但不支持把目标文件重命名为其他文件名。
|
||
-->
|
||
<_GFrameworkGodotProjectFileName>$([System.IO.Path]::GetFileName('$(GFrameworkGodotProjectFile)'))</_GFrameworkGodotProjectFileName>
|
||
<_GFrameworkGodotProjectFileNameLower>$([System.String]::Copy('$(_GFrameworkGodotProjectFileName)').ToLowerInvariant())</_GFrameworkGodotProjectFileNameLower>
|
||
</PropertyGroup>
|
||
|
||
<ItemGroup>
|
||
<Analyzer Include="$(MSBuildThisFileDirectory)../analyzers/dotnet/cs/GFramework.Godot.SourceGenerators.dll"/>
|
||
<Analyzer Include="$(MSBuildThisFileDirectory)../analyzers/dotnet/cs/GFramework.Godot.SourceGenerators.Abstractions.dll"/>
|
||
<Analyzer Include="$(MSBuildThisFileDirectory)../analyzers/dotnet/cs/GFramework.SourceGenerators.Common.dll"/>
|
||
</ItemGroup>
|
||
|
||
<ItemGroup Condition="Exists('$(MSBuildProjectDirectory)/$(GFrameworkGodotProjectFile)')">
|
||
<AdditionalFiles Include="$(MSBuildProjectDirectory)/$(GFrameworkGodotProjectFile)"/>
|
||
</ItemGroup>
|
||
|
||
<Target Name="ValidateGFrameworkGodotProjectFileName"
|
||
BeforeTargets="CoreCompile"
|
||
Condition="Exists('$(MSBuildProjectDirectory)/$(GFrameworkGodotProjectFile)') and '$(_GFrameworkGodotProjectFileNameLower)' != 'project.godot'">
|
||
<Warning Text="GFrameworkGodotProjectFile can change the relative path, but the file name must remain 'project.godot'; otherwise GodotProjectMetadataGenerator will ignore the file."/>
|
||
</Target>
|
||
|
||
<!-- Ensure the analyzers are loaded -->
|
||
<Target Name="EnsureGFrameworkGodotAnalyzers" BeforeTargets="CoreCompile">
|
||
<Message Text="Loading GFramework.Godot source generators" Importance="high"/>
|
||
</Target>
|
||
</Project>
|