Skip to content

Commit e003057

Browse files
committed
按需依赖
1 parent 258b5ed commit e003057

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

OpenHarmony.NET.Compiler.Pack.nuspec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
<group targetFramework="net9.0">
1111
<dependency id="OpenHarmony.NET.PublishAotCross" version="0.0.0-alpha.2"/>
1212
<dependency id="OpenHarmony.NET.Runtime" version="0.0.0-alpha.19"/>
13-
<dependency id="PublishAotCross.Compiler" version="0.0.0-alpha.27"/>
1413
</group>
1514
</dependencies>
1615
</metadata>
16+
17+
18+
<files>
19+
<!-- 将 .targets 文件包含到 build 文件夹中 -->
20+
<file src="OpenHarmony.NET.Compiler.Pack.targets" target="build/OpenHarmony.NET.Compiler.Pack.targets" />
21+
</files>
22+
1723
</package>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<PropertyGroup>
3+
<HostRuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('Windows')) and $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) == 'x64'">win-x64</HostRuntimeIdentifier>
4+
<HostRuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('Windows')) and $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)== 'arm64'">win-arm64</HostRuntimeIdentifier>
5+
6+
<HostRuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('Linux')) and $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)== 'x64'">linux-x64</HostRuntimeIdentifier>
7+
<HostRuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('Linux')) and $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)== 'arm64'">linux-arm64</HostRuntimeIdentifier>
8+
9+
<HostRuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('macOS')) and $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)== 'x64'">osx-x64</HostRuntimeIdentifier>
10+
<HostRuntimeIdentifier Condition="$([MSBuild]::IsOSPlatform('macOS')) and $([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)== 'arm64'">osx-arm64</HostRuntimeIdentifier>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<PackageReference Condition="$(HostRuntimeIdentifier) == 'win-x64'" Include="PublishAotCross.Compiler.win-x64" Version="0.0.0-alpha.34"/>
15+
<PackageReference Condition="$(HostRuntimeIdentifier) == 'linux-x64'" Include="PublishAotCross.Compiler.linux-x64" Version="0.0.0-alpha.34"/>
16+
</ItemGroup>
17+
18+
</Project>

0 commit comments

Comments
 (0)