GFramework/GFramework.Godot.SourceGenerators/GeWuYou.GFramework.Godot.SourceGenerators.targets
GeWuYou 61ee3a8f0c feat(Godot.SourceGenerators): 添加 Godot 项目元数据源码生成器
- 实现 project.godot 文件解析功能,支持 AutoLoad 和 Input Action 元数据提取
- 生成 AutoLoads 强类型访问入口,提供 GetRequiredNode 和 TryGetNode 方法
- 生成 InputActions 常量类,避免手写字符串魔法值
- 添加 AutoLoadAttribute 特性支持显式类型映射声明
- 实现标识符冲突检测和自动后缀追加机制
- 添加完整的诊断系统支持,包括类型继承检查和重复条目警告
- 创建 MSBuild 集成目标文件确保生成器正确加载
- 提供详细的 README 文档说明使用方法和最佳实践
2026-04-14 08:22:12 +08:00

29 lines
1.4 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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>
</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>
<!-- Ensure the analyzers are loaded -->
<Target Name="EnsureGFrameworkGodotAnalyzers" BeforeTargets="CoreCompile">
<Message Text="Loading GFramework.Godot source generators" Importance="high"/>
</Target>
</Project>