Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 50128f7

Browse files
authored
Create Xamarin.Legacy.OpenTK Nuget Package (#28)
Create a new Xamarin.Legacy.OpenTK NuGet package. This will replace `OpenTK-1.0.dll`, currently shipped with Xamarin.Android.
1 parent 72f4b08 commit 50128f7

File tree

5 files changed

+86
-11
lines changed

5 files changed

+86
-11
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
*.userprefs
22
obj
3-
bin
3+
bin
4+
*.nupkg
5+
*.snupkg

OpenTK.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup>
3+
<_OpenTKNugetVersion>0.0.1-alpha</_OpenTKNugetVersion>
4+
</PropertyGroup>
5+
</Project>

Projects/OpenTK.Android/OpenTK.Android.csproj

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Xamarin.Legacy.Sdk">
3+
<Import Project="$(MSBuildThisFileDirectory)..\..\OpenTK.props" />
34
<PropertyGroup>
4-
<AssemblyName>OpenTK1.0</AssemblyName>
5+
<AssemblyName>OpenTK-1.0</AssemblyName>
56
<TargetFrameworks>monoandroid11.0;net6.0-android</TargetFrameworks>
67
<AssemblyOriginatorKeyFile>..\..\OpenTK.snk</AssemblyOriginatorKeyFile>
78
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -52,5 +53,26 @@
5253
<ItemGroup>
5354
<PackageReference Include="System.Drawing.Common" Version="*" Condition="$(TargetFramework.Contains ('ios'))" />
5455
</ItemGroup>
56+
57+
<PropertyGroup>
58+
<!--
59+
nuget packaging
60+
-->
61+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
62+
<PackageId>Xamarin.Legacy.OpenTK</PackageId>
63+
<PackageVersion>$(_OpenTKNugetVersion)</PackageVersion>
64+
<Title>Xamarin.Legacy.OpenTK</Title>
65+
<Summary>Legacy OpenGL, OpenCL and OpenAL Bindings for Xamarin. (https://github.com/mono/opentk)</Summary>
66+
<Description>Legacy OpenGL, OpenCL and OpenAL Bindings for Xamarin. (https://github.com/mono/opentk)</Description>
67+
<Authors>Microsoft</Authors>
68+
<Owners>Microsoft, Xamarin</Owners>
69+
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
70+
<PackageProjectUrl>https://github.com/mono/opentk</PackageProjectUrl>
71+
<PackageLicenseUrl>https://raw.githubusercontent.com/mono/opentk/main/Documentation/License.txt</PackageLicenseUrl>
72+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
73+
<PackageTags></PackageTags>
74+
<PackageOutputPath>$(MSBuildThisFileDirectory)..\..\</PackageOutputPath>
75+
<AllowedOutputExtensionsInPackageBuildOutputFolder>.pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
76+
</PropertyGroup>
5577

5678
</Project>

SignList.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
3+
<ItemGroup>
4+
<FirstParty Include="OpenTK-1.0.*" />
5+
</ItemGroup>
6+
7+
</Project>

azure-pipelines.yml

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
trigger:
22
branches:
33
include:
4-
- master
4+
- main
55
- refs/tags/*
66
resources:
77
repositories:
@@ -14,12 +14,18 @@ variables:
1414
- group: Xamarin-Secrets
1515
- name: Configuration
1616
value: Release
17-
DotNetVersion: 6.0.100-preview.1.21103.13
18-
DotNet.Cli.Telemetry.OptOut: true
19-
Android.Msi: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android.11.0.200.85.msi
20-
Android.Pkg: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android-11.0.200-ci.master.85.pkg
21-
iOS.Msi: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/Microsoft.NET.Workload.iOS.14.3.100-ci.main.1079.msi
22-
iOS.Pkg: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/notarized/Microsoft.iOS.Bundle.14.3.100-ci.main.1079.pkg
17+
- name: DotNetVersion
18+
value: 6.0.100-preview.1.21103.13
19+
- name: DotNet.Cli.Telemetry.OptOut
20+
value: true
21+
- name: Android.Msi
22+
value: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android.11.0.200.85.msi
23+
- name: Android.Pkg
24+
value: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android-11.0.200-ci.master.85.pkg
25+
- name: iOS.Msi
26+
value: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/Microsoft.NET.Workload.iOS.14.3.100-ci.main.1079.msi
27+
- name: iOS.Pkg
28+
value: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/notarized/Microsoft.iOS.Bundle.14.3.100-ci.main.1079.pkg
2329

2430
stages:
2531
- stage: Build
@@ -46,5 +52,38 @@ stages:
4652
- powershell: |
4753
& dotnet build Projects\OpenTK.Android\OpenTK.Android.csproj -c Debug -bl:$(LogDirectory)\Debug.binlog
4854
& dotnet build Projects\OpenTK.Android\OpenTK.Android.csproj -c Release -bl:$(LogDirectory)\Release.binlog
49-
displayName: build samples
50-
errorActionPreference: stop
55+
displayName: build libraries
56+
errorActionPreference: stop
57+
- powershell: |
58+
& dotnet pack Projects\OpenTK.Android\OpenTK.Android.csproj -c Release -bl:$(LogDirectory)\PackRelease.binlog
59+
displayName: pack NuGet
60+
errorActionPreference: stop
61+
- task: CopyFiles@2
62+
displayName: Copy nupkg
63+
inputs:
64+
contents: '*.nupkg'
65+
targetFolder: $(Build.ArtifactStagingDirectory)
66+
- task: CopyFiles@2
67+
displayName: Copy SignList
68+
inputs:
69+
contents: 'SignList.xml'
70+
targetFolder: $(Build.ArtifactStagingDirectory)
71+
- task: CopyFiles@2
72+
displayName: Copy snupkg
73+
inputs:
74+
contents: '*.snupkg'
75+
targetFolder: $(Build.ArtifactStagingDirectory)
76+
- task: PublishBuildArtifacts@1
77+
displayName: upload artifacts
78+
inputs:
79+
artifactName: 'nuget'
80+
pathtoPublish: $(Build.ArtifactStagingDirectory)
81+
82+
- stage: Publish
83+
dependsOn: Build
84+
condition: eq(variables['System.TeamProject'], 'devdiv') # only sign the packages when running on Windows, and using the private server which has the certificates
85+
jobs:
86+
- template: sign-artifacts/jobs/v2.yml@internal-templates
87+
parameters:
88+
signListPath: 'SignList.xml'
89+
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')

0 commit comments

Comments
 (0)