Skip to content

Commit 68b1b91

Browse files
authored
[build] Include MIT license in most NuGet packages (#8787)
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.
1 parent 2fa3f3b commit 68b1b91

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

LICENSE LICENSE.TXT

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
Xamarin.Android SDK
2-
31
The MIT License (MIT)
42

5-
Copyright (c) .NET Foundation Contributors
3+
Copyright (c) .NET Foundation and Contributors
64

75
All rights reserved.
86

@@ -23,4 +21,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2321
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2422
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2523
SOFTWARE.
26-

build-tools/create-packs/Directory.Build.targets

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
<Target Name="_SetGlobalProperties">
4848
<ItemGroup>
4949
<_GlobalProperties Include="-p:Configuration=$(Configuration)" />
50-
<_GlobalProperties Include="-p:NuGetLicense=$(NuGetLicense)" />
5150
<_GlobalProperties Include="-p:IncludeSymbols=False" />
5251
</ItemGroup>
5352
</Target>
@@ -103,7 +102,7 @@
103102
/>
104103
<!-- The .nupkg contains the files under /data/, so we need to move them -->
105104
<ItemGroup>
106-
<_WLExtractedFiles Include="$(_SdkManifestsFolder)temp\LICENSE" />
105+
<_WLExtractedFiles Include="$(_SdkManifestsFolder)temp\LICENSE.TXT" />
107106
<_WLExtractedFiles Include="$(_SdkManifestsFolder)temp\data\*" />
108107
</ItemGroup>
109108
<Move SourceFiles="@(_WLExtractedFiles)" DestinationFolder="$(_SdkManifestsFolder)microsoft.net.sdk.android" />

build-tools/create-packs/License.targets

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<!-- Ownership and LICENSE settings for .nupkg's -->
1+
<!-- Ownership and LICENSE.TXT settings for .nupkg's -->
22
<Project>
33
<PropertyGroup>
44
<Authors>Microsoft</Authors>
55
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
66
<PackageProjectUrl>https://github.com/xamarin/xamarin-android</PackageProjectUrl>
77
<NuGetLicense Condition="Exists('$(XamarinAndroidSourcePath)external\monodroid\tools\scripts\License.txt')">$(XamarinAndroidSourcePath)external\monodroid\tools\scripts\License.txt</NuGetLicense>
8-
<NuGetLicense Condition=" '$(NuGetLicense)' == '' ">$(XamarinAndroidSourcePath)LICENSE</NuGetLicense>
9-
<PackageLicenseFile>LICENSE</PackageLicenseFile>
8+
<NuGetLicense Condition=" '$(NuGetLicense)' == '' or '$(PackageId)' != 'Microsoft.Android.Sdk.$(HostOS)' ">$(XamarinAndroidSourcePath)LICENSE.TXT</NuGetLicense>
9+
<PackageLicenseFile>LICENSE.TXT</PackageLicenseFile>
1010
<BeforePack>_GetLicense;$(BeforePack)</BeforePack>
1111
</PropertyGroup>
1212
<Target Name="_GetLicense">

0 commit comments

Comments
 (0)