[build] Include MIT license in most NuGet packages (#8787)

Fixes: https://github.com/xamarin/xamarin-android/issues/8779

Updates all NuGet packages other than Microsoft.Android.Sdk to include
the MIT license at the root of the repo.

The license file name and contents have also been updated to improve
consistency with other dotnet repos.
This commit is contained in:
Peter Collins 2024-03-06 09:43:54 -08:00 коммит произвёл GitHub
Родитель 2fa3f3b10f
Коммит 68b1b91a20
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -1,8 +1,6 @@
Xamarin.Android SDK
The MIT License (MIT)
Copyright (c) .NET Foundation Contributors
Copyright (c) .NET Foundation and Contributors
All rights reserved.
@ -23,4 +21,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Просмотреть файл

@ -47,7 +47,6 @@
<Target Name="_SetGlobalProperties">
<ItemGroup>
<_GlobalProperties Include="-p:Configuration=$(Configuration)" />
<_GlobalProperties Include="-p:NuGetLicense=$(NuGetLicense)" />
<_GlobalProperties Include="-p:IncludeSymbols=False" />
</ItemGroup>
</Target>
@ -103,7 +102,7 @@
/>
<!-- The .nupkg contains the files under /data/, so we need to move them -->
<ItemGroup>
<_WLExtractedFiles Include="$(_SdkManifestsFolder)temp\LICENSE" />
<_WLExtractedFiles Include="$(_SdkManifestsFolder)temp\LICENSE.TXT" />
<_WLExtractedFiles Include="$(_SdkManifestsFolder)temp\data\*" />
</ItemGroup>
<Move SourceFiles="@(_WLExtractedFiles)" DestinationFolder="$(_SdkManifestsFolder)microsoft.net.sdk.android" />

Просмотреть файл

@ -1,12 +1,12 @@
<!-- Ownership and LICENSE settings for .nupkg's -->
<!-- Ownership and LICENSE.TXT settings for .nupkg's -->
<Project>
<PropertyGroup>
<Authors>Microsoft</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/xamarin/xamarin-android</PackageProjectUrl>
<NuGetLicense Condition="Exists('$(XamarinAndroidSourcePath)external\monodroid\tools\scripts\License.txt')">$(XamarinAndroidSourcePath)external\monodroid\tools\scripts\License.txt</NuGetLicense>
<NuGetLicense Condition=" '$(NuGetLicense)' == '' ">$(XamarinAndroidSourcePath)LICENSE</NuGetLicense>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<NuGetLicense Condition=" '$(NuGetLicense)' == '' or '$(PackageId)' != 'Microsoft.Android.Sdk.$(HostOS)' ">$(XamarinAndroidSourcePath)LICENSE.TXT</NuGetLicense>
<PackageLicenseFile>LICENSE.TXT</PackageLicenseFile>
<BeforePack>_GetLicense;$(BeforePack)</BeforePack>
</PropertyGroup>
<Target Name="_GetLicense">