Skip to content

Commit

Permalink
[build] Include MIT license in most NuGet packages (#8787)
Browse files Browse the repository at this point in the history
Fixes: #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.
  • Loading branch information
pjcollins committed Mar 6, 2024
1 parent f68622c commit d5011ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 1 addition & 4 deletions LICENSE → LICENSE.TXT
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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.

3 changes: 1 addition & 2 deletions build-tools/create-packs/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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" />
Expand Down
6 changes: 3 additions & 3 deletions build-tools/create-packs/License.targets
Original file line number Diff line number Diff line change
@@ -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">
Expand Down

0 comments on commit d5011ac

Please sign in to comment.