Skip to content

Commit b7e4e18

Browse files
JusterZhuclaude
andauthored
chore: upgrade to net10.0-android and add NuGet packaging metadata (#13)
* feat: upgrade to net10.0-android and add NuGet packaging metadata - Upgrade target framework from net8.0-android34.0 to net10.0-android - Upgrade tests from net8.0 to net10.0 - Add NuGet packaging metadata (Version, License, Readme, SourceLink, snupkg) - Add GeneralUpdate.Avalonia.slnx to manage src projects - Update global.json to use latestMajor rollForward - Fix SupportedOSPlatformVersion from 21 to 26 - Update .gitignore to exclude .idea/ - Update README with new target framework info Co-Authored-By: Claude <noreply@anthropic.com> * fix: address Copilot review comments - Pin global.json SDK to 10.0.100 (net10.0 requires 10.x SDK) - Add Microsoft.SourceLink.GitHub package reference for proper SourceLink - Update README: remove net8.0 references, require only net10.0 - Add .idea/ to .gitignore Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent ebf83d3 commit b7e4e18

6 files changed

Lines changed: 47 additions & 11 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ CodeCoverage/
5151
# NUnit
5252
*.VisualState.xml
5353
TestResult.xml
54-
nunit-*.xml
54+
nunit-*.xmlsrc/.idea/
55+
56+
# JetBrains Rider
57+
.idea/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## 项目简介
1111

12-
`GeneralUpdate.Avalonia` 是面向 Avalonia 应用的更新能力仓库。当前核心模块为 `GeneralUpdate.Avalonia.Android`,提供 Android 平台自动更新流程编排能力(无 UI),适配 `net8.0-android`,面向 Avalonia 12+ 应用。
12+
`GeneralUpdate.Avalonia` 是面向 Avalonia 应用的更新能力仓库。当前核心模块为 `GeneralUpdate.Avalonia.Android`,提供 Android 平台自动更新流程编排能力(无 UI),适配 `net10.0-android`,面向 Avalonia 12+ 应用。
1313

1414
项目将更新流程拆分为可组合的抽象接口,便于在不同业务场景下替换版本比较、下载、哈希校验、安装拉起、日志与事件分发实现。
1515

@@ -25,8 +25,8 @@
2525

2626
### 环境准备
2727

28-
- .NET SDK:`8.0+`
29-
- 平台:`Android (net8.0-android)`
28+
- .NET SDK:`10.0+`
29+
- 平台:`Android (net10.0-android)`
3030
- Avalonia:`12+`
3131
- Git:`2.30+`
3232

global.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"sdk": {
3-
"version": "8.0.418",
4-
"rollForward": "latestFeature"
3+
"version": "10.0.100",
4+
"rollForward": "latestMajor",
5+
"allowPrerelease": true
56
}
67
}
Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,46 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0-android34.0</TargetFramework>
4-
<SupportedOSPlatformVersion>21.0</SupportedOSPlatformVersion>
3+
<TargetFramework>net10.0-android</TargetFramework>
4+
<SupportedOSPlatformVersion>26.0</SupportedOSPlatformVersion>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<LangVersion>latest</LangVersion>
8+
9+
<!-- Pack settings -->
810
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
911
<PackageId>GeneralUpdate.Avalonia.Android</PackageId>
10-
<Description>UI-free, Avalonia-compatible Android auto-update core library.</Description>
12+
<Version>1.0.0</Version>
13+
<Description>UI-free, Avalonia-compatible Android auto-update core library. Provides version comparison, resumable APK download with SHA256 verification, and APK installation orchestration.</Description>
1114
<Authors>GeneralLibrary</Authors>
15+
<Copyright>Copyright (c) GeneralLibrary</Copyright>
16+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
17+
<PackageProjectUrl>https://github.com/GeneralLibrary/GeneralUpdate.Avalonia</PackageProjectUrl>
1218
<RepositoryUrl>https://github.com/GeneralLibrary/GeneralUpdate.Avalonia</RepositoryUrl>
13-
<PackageTags>avalonia;android;update;apk;autoupdate</PackageTags>
19+
<RepositoryType>git</RepositoryType>
20+
<PackageTags>avalonia;android;update;apk;autoupdate;generalupdate</PackageTags>
21+
<PackageReadmeFile>README.md</PackageReadmeFile>
22+
<PackageReleaseNotes>https://github.com/GeneralLibrary/GeneralUpdate.Avalonia/releases</PackageReleaseNotes>
23+
24+
<!-- SourceLink support -->
25+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
26+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
27+
<IncludeSymbols>true</IncludeSymbols>
28+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
29+
30+
<!-- Deterministic build for CI -->
31+
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
1432
</PropertyGroup>
1533

1634
<ItemGroup>
35+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
36+
<PrivateAssets>all</PrivateAssets>
37+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
38+
</PackageReference>
1739
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.13.1.2" />
1840
</ItemGroup>
41+
42+
<!-- Include README in the package -->
43+
<ItemGroup>
44+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
45+
</ItemGroup>
1946
</Project>

src/GeneralUpdate.Avalonia.slnx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Solution>
2+
<Folder Name="/src/">
3+
<Project Path="GeneralUpdate.Avalonia.Android/GeneralUpdate.Avalonia.Android.csproj" />
4+
</Folder>
5+
</Solution>

tests/GeneralUpdate.Avalonia.Android.Tests/GeneralUpdate.Avalonia.Android.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net10.0</TargetFramework>
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
66
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)