Skip to content

Commit ca0a0fa

Browse files
authored
Add projects for separated client and server only API (#20)
1 parent 8a4a4a4 commit ca0a0fa

14 files changed

Lines changed: 488 additions & 39 deletions

azure-pipelines.yml

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,59 @@ variables:
4545
steps:
4646

4747
# step from template @ nf-tools repo
48-
# all build, update and publish steps
49-
- template: azure-pipelines-templates/class-lib-build.yml@templates
48+
# build steps only
49+
- template: azure-pipelines-templates/class-lib-build-only.yml@templates
50+
51+
# package steps
52+
- template: azure-pipelines-templates/class-lib-package.yml@templates
53+
parameters:
54+
nugetPackageName: 'nanoFramework.System.Net.Http'
55+
56+
- template: azure-pipelines-templates/class-lib-package.yml@templates
5057
parameters:
51-
sourceFileName: 'nf_networking_sntp.cpp'
52-
classLibName: 'nanoFramework.System.Net.Http'
53-
skipNativeUpdate: true
58+
nugetPackageName: 'nanoFramework.System.Net.Http-client'
59+
60+
- template: azure-pipelines-templates/class-lib-package.yml@templates
61+
parameters:
62+
nugetPackageName: 'nanoFramework.System.Net.Http-server'
63+
64+
# create or update GitHub release
65+
- task: GitHubReleasePublish@1
66+
inputs:
67+
githubEndpoint: 'nanoframework'
68+
githubOwner: 'nanoframework'
69+
githubRepositoryName: $(repoName)
70+
githubTag: v$(MY_NUGET_VERSION)
71+
githubReleaseTitle: '$(nugetPackageName) Library v$(MY_NUGET_VERSION)'
72+
githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).<br><br><h4>Install from nanoFramework MyGet development feed</h4><br>The following NuGet packages are available for download from this release:<br>:package: [.NET](https://www.myget.org/feed/nanoframework-dev/package/nuget/$(nugetPackageName)/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION)<br>:package: [.NET (client API only)](https://www.myget.org/feed/nanoframework-dev/package/nuget/nanoFramework.System.Net.Http-client/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION).<br>:package: [.NET (server API only)](https://www.myget.org/feed/nanoframework-dev/package/nuget/nanoFramework.System.Net.Http-server/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION).'
73+
githubTargetCommitsh: $(Build.SourceVersion)
74+
githubReleaseDraft: true
75+
githubReleasePrerelease: true
76+
githubReuseDraftOnly: true
77+
githubReuseRelease: true
78+
githubEditRelease: true
79+
githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*.nupkg'
80+
condition: and( succeeded(), not( startsWith(variables['Build.SourceBranch'], 'refs/pull') ), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) )
81+
displayName: Create/Update GitHub release
82+
83+
# create or update GitHub release ON tags from release or master branches
84+
- task: GitHubReleasePublish@1
85+
inputs:
86+
githubEndpoint: 'nanoframework'
87+
githubOwner: 'nanoframework'
88+
githubRepositoryName: $(repoName)
89+
githubTag: v$(MY_NUGET_VERSION)
90+
githubReleaseTitle: '$(nugetPackageName) Library v$(MY_NUGET_VERSION)'
91+
githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).<br><br><h4>Install from NuGet</h4><br>The following NuGet packages are available for download from this release:<br>:package: [.NET](https://www.nuget.org/packages/$(nugetPackageName)/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION).<br>:package: [.NET (client API only)](https://www.nuget.org/packages/nanoFramework.System.Net.Http-client/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION).<br>:package: [.NET (server API only)](https://www.nuget.org/packages/nanoFramework.System.Net.Http-server/$(MY_NUGET_VERSION)) v$(MY_NUGET_VERSION).'
92+
githubTargetCommitsh: $(Build.SourceVersion)
93+
githubReleaseDraft: false
94+
githubReleasePrerelease: false
95+
githubReuseDraftOnly: false
96+
githubReuseRelease: true
97+
githubEditRelease: true
98+
githubReleaseAsset: '$(Build.ArtifactStagingDirectory)/*.nupkg'
99+
condition: and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') )
100+
displayName: Create/Update GitHub release
54101

55102
# step from template @ nf-tools repo
56103
# report error
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
3+
<metadata>
4+
<id>nanoFramework.System.Net.Http-client</id>
5+
<version>$version$</version>
6+
<title>nanoFramework.System.Net.Http-client</title>
7+
<authors>nanoFramework project contributors</authors>
8+
<owners>nanoFramework project contributors</owners>
9+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
10+
<releaseNotes>
11+
</releaseNotes>
12+
<developmentDependency>false</developmentDependency>
13+
<projectUrl>https://github.com/nanoframework</projectUrl>
14+
<iconUrl>https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad</iconUrl>
15+
<copyright>Copyright (c) 2018 The nanoFramework project contributors</copyright>
16+
<description>
17+
This package includes the nanoFramework.System.Net.Http assembly (client API only) for nanoFramework C# projects.
18+
There is also a package with the server API only and another with the full API.
19+
</description>
20+
<summary>nanoFramework.System.Net.Http assembly (client API only) for nanoFramework C# projects</summary>
21+
<tags>nanoFramework C# csharp netmf netnf nanoFramework.System.Net.Http</tags>
22+
<dependencies>
23+
<dependency id="nanoFramework.CoreLibrary" version="[1.1.1]" />
24+
<dependency id="nanoFramework.Runtime.Events" version="[1.0.5-preview-008]" />
25+
<dependency id="nanoFramework.System.Net" version="[1.0.6-preview-011]" />
26+
</dependencies>
27+
</metadata>
28+
<files>
29+
<file src="nanoFramework.System.Net.Http-client\bin\Release\System.Net.Http.dll" target="lib\System.Net.Http.dll" />
30+
<file src="nanoFramework.System.Net.Http-client\bin\Release\System.Net.Http.pdb" target="lib\System.Net.Http.pdb" />
31+
<file src="nanoFramework.System.Net.Http-client\bin\Release\System.Net.Http.pdbx" target="lib\System.Net.Http.pdbx" />
32+
<file src="nanoFramework.System.Net.Http-client\bin\Release\System.Net.Http.pe" target="lib\System.Net.Http.pe" />
33+
<file src="nanoFramework.System.Net.Http-client\bin\Release\System.Net.Http.xml" target="lib\System.Net.Http.xml" />
34+
</files>
35+
</package>
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<NanoFrameworkProjectSystemPath>$(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
5+
</PropertyGroup>
6+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
7+
<PropertyGroup>
8+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10+
<ProjectTypeGuids>{11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
11+
<ProjectGuid>6c6ee1b2-20f0-4f0e-8085-7ecd1e692567</ProjectGuid>
12+
<OutputType>Library</OutputType>
13+
<AppDesignerFolder>Properties</AppDesignerFolder>
14+
<FileAlignment>512</FileAlignment>
15+
<RootNamespace>System.Net.Http</RootNamespace>
16+
<AssemblyName>System.Net.Http</AssemblyName>
17+
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
18+
<DocumentationFile>bin\$(Configuration)\System.Net.Http.xml</DocumentationFile>
19+
</PropertyGroup>
20+
<PropertyGroup>
21+
<SignAssembly>true</SignAssembly>
22+
</PropertyGroup>
23+
<PropertyGroup>
24+
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
25+
</PropertyGroup>
26+
<PropertyGroup>
27+
<DelaySign>false</DelaySign>
28+
</PropertyGroup>
29+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
30+
<ItemGroup>
31+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.Http.Constants.cs">
32+
<Link>Http\System.Net.Http.Constants.cs</Link>
33+
</Compile>
34+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.Internal.WebRequestPrefixElement.cs">
35+
<Link>Http\System.Net.Internal.WebRequestPrefixElement.cs</Link>
36+
</Compile>
37+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.AuthenticationType.cs">
38+
<Link>Http\System.Net.AuthenticationType.cs</Link>
39+
</Compile>
40+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.HttpStatusCode.cs">
41+
<Link>Http\System.Net.HttpStatusCode.cs</Link>
42+
</Compile>
43+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.HttpVersion.cs">
44+
<Link>Http\System.Net.HttpVersion.cs</Link>
45+
</Compile>
46+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.HttpWebRequest.cs">
47+
<Link>Http\System.Net.HttpWebRequest.cs</Link>
48+
</Compile>
49+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.HttpWebResponse.cs">
50+
<Link>Http\System.Net.HttpWebResponse.cs</Link>
51+
</Compile>
52+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.Internal.cs">
53+
<Link>Http\System.Net.Internal.cs</Link>
54+
</Compile>
55+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.iwebproxy.cs">
56+
<Link>Http\System.Net.iwebproxy.cs</Link>
57+
</Compile>
58+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.IWebRequestCreate.cs">
59+
<Link>Http\System.Net.IWebRequestCreate.cs</Link>
60+
</Compile>
61+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.NetworkCredential.cs">
62+
<Link>Http\System.Net.NetworkCredential.cs</Link>
63+
</Compile>
64+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.ProtocolViolationException.cs">
65+
<Link>Http\System.Net.ProtocolViolationException.cs</Link>
66+
</Compile>
67+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.WebException.cs">
68+
<Link>Http\System.Net.WebException.cs</Link>
69+
</Compile>
70+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.WebHeaders.cs">
71+
<Link>Http\System.Net.WebHeaders.cs</Link>
72+
</Compile>
73+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.webproxy.cs">
74+
<Link>Http\System.Net.webproxy.cs</Link>
75+
</Compile>
76+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.WebRequest.cs">
77+
<Link>Http\System.Net.WebRequest.cs</Link>
78+
</Compile>
79+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.WebResponse.cs">
80+
<Link>Http\System.Net.WebResponse.cs</Link>
81+
</Compile>
82+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net.WebStatus.cs">
83+
<Link>Http\System.Net.WebStatus.cs</Link>
84+
</Compile>
85+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net._HeaderInfo.cs">
86+
<Link>Http\System.Net._HeaderInfo.cs</Link>
87+
</Compile>
88+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net._HeaderInfoTable.cs">
89+
<Link>Http\System.Net._HeaderInfoTable.cs</Link>
90+
</Compile>
91+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net._HttpDateParse.cs">
92+
<Link>Http\System.Net._HttpDateParse.cs</Link>
93+
</Compile>
94+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net._InputNetworkStreamWrapper.cs">
95+
<Link>Http\System.Net._InputNetworkStreamWrapper.cs</Link>
96+
</Compile>
97+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net._OutputNetworkStreamWrapper.cs">
98+
<Link>Http\System.Net._OutputNetworkStreamWrapper.c</Link>
99+
</Compile>
100+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Net._ValidationHelper.cs">
101+
<Link>Http\System.Net._ValidationHelper.cs</Link>
102+
</Compile>
103+
<Compile Include="..\nanoFramework.System.Net.Http\Http\System.Uri.cs">
104+
<Link>Http\System.Uri.cs</Link>
105+
</Compile>
106+
<Compile Include="..\nanoFramework.System.Net.Http\Properties\AssemblyInfo.cs">
107+
<Link>Properties\AssemblyInfo.cs</Link>
108+
</Compile>
109+
</ItemGroup>
110+
<ItemGroup>
111+
<None Include="..\key.snk" />
112+
<None Include="\nanoFramework.System.Net.Http\packages.config" >
113+
<Link>packages.config</Link>
114+
</None>
115+
</ItemGroup>
116+
<ItemGroup>
117+
<Reference Include="mscorlib, Version=1.1.1.7, Culture=neutral, PublicKeyToken=c07d481e9758c731">
118+
<HintPath>..\packages\nanoFramework.CoreLibrary.1.1.1\lib\mscorlib.dll</HintPath>
119+
<Private>True</Private>
120+
</Reference>
121+
<Reference Include="nanoFramework.Runtime.Events, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
122+
<HintPath>..\packages\nanoFramework.Runtime.Events.1.0.5-preview-008\lib\nanoFramework.Runtime.Events.dll</HintPath>
123+
<Private>True</Private>
124+
</Reference>
125+
<Reference Include="System.Net, Version=1.0.6.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
126+
<HintPath>..\packages\nanoFramework.System.Net.1.0.6-preview-011\lib\System.Net.dll</HintPath>
127+
<Private>True</Private>
128+
</Reference>
129+
</ItemGroup>
130+
<ItemGroup>
131+
<Folder Include="Http\" />
132+
<Folder Include="Properties\" />
133+
</ItemGroup>
134+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
135+
<ProjectExtensions>
136+
<ProjectCapabilities>
137+
<ProjectConfigurationsDeclaredAsItems />
138+
</ProjectCapabilities>
139+
</ProjectExtensions>
140+
<Import Project="..\packages\Nerdbank.GitVersioning.3.0.6-beta\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\packages\Nerdbank.GitVersioning.3.0.6-beta\build\Nerdbank.GitVersioning.targets')" />
141+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
142+
<PropertyGroup>
143+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
144+
</PropertyGroup>
145+
<Error Condition="!Exists('..\packages\Nerdbank.GitVersioning.3.0.6-beta\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Nerdbank.GitVersioning.3.0.6-beta\build\Nerdbank.GitVersioning.targets'))" />
146+
</Target>
147+
</Project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
3+
<metadata>
4+
<id>nanoFramework.System.Net.Http-server</id>
5+
<version>$version$</version>
6+
<title>nanoFramework.System.Net.Http-server</title>
7+
<authors>nanoFramework project contributors</authors>
8+
<owners>nanoFramework project contributors</owners>
9+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
10+
<releaseNotes>
11+
</releaseNotes>
12+
<developmentDependency>false</developmentDependency>
13+
<projectUrl>https://github.com/nanoframework</projectUrl>
14+
<iconUrl>https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad</iconUrl>
15+
<copyright>Copyright (c) 2018 The nanoFramework project contributors</copyright>
16+
<description>
17+
This package includes the nanoFramework.System.Net.Http assembly (server API only) for nanoFramework C# projects.
18+
There is also a package with the client API only and another with the full API.
19+
</description>
20+
<summary>nanoFramework.System.Net.Http assembly (server API only) for nanoFramework C# projects</summary>
21+
<tags>nanoFramework C# csharp netmf netnf nanoFramework.System.Net.Http</tags>
22+
<dependencies>
23+
<dependency id="nanoFramework.CoreLibrary" version="[1.1.1]" />
24+
<dependency id="nanoFramework.Runtime.Events" version="[1.0.5-preview-008]" />
25+
<dependency id="nanoFramework.System.Net" version="[1.0.6-preview-011]" />
26+
</dependencies>
27+
</metadata>
28+
<files>
29+
<file src="nanoFramework.System.Net.Http-server\bin\Release\System.Net.Http.dll" target="lib\System.Net.Http.dll" />
30+
<file src="nanoFramework.System.Net.Http-server\bin\Release\System.Net.Http.pdb" target="lib\System.Net.Http.pdb" />
31+
<file src="nanoFramework.System.Net.Http-server\bin\Release\System.Net.Http.pdbx" target="lib\System.Net.Http.pdbx" />
32+
<file src="nanoFramework.System.Net.Http-server\bin\Release\System.Net.Http.pe" target="lib\System.Net.Http.pe" />
33+
<file src="nanoFramework.System.Net.Http-server\bin\Release\System.Net.Http.xml" target="lib\System.Net.Http.xml" />
34+
</files>
35+
</package>

0 commit comments

Comments
 (0)