Skip to content

Commit

Permalink
[binderator] Add check to ensure we use Xamarin.Build.Download for pr…
Browse files Browse the repository at this point in the history
…oprietary licensed artifacts.
  • Loading branch information
jpobst committed Oct 11, 2024
1 parent 6b545bc commit 12743c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 4 additions & 5 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2360,9 +2360,7 @@
"nugetVersion": "1.1.2.6",
"nugetId": "Xamarin.Google.Android.InstallReferrer",
"dependencyOnly": false,
"frozen": true,
"type": "androidlibrary",
"comments": "Changed from Apache to Android SDK License"
"type": "xbd"
},
{
"groupId": "com.android.volley",
Expand Down Expand Up @@ -3559,7 +3557,7 @@
"nugetVersion": "3.0.0.1",
"nugetId": "Xamarin.Google.UserMessagingPlatform",
"dependencyOnly": false,
"type": "androidlibrary"
"type": "xbd"
},
{
"groupId": "com.google.assistant.appactions",
Expand All @@ -3575,7 +3573,8 @@
"version": "0.0.1",
"nugetVersion": "0.0.1.16",
"nugetId": "Xamarin.Google.Assistant.AppActions.Widgets",
"dependencyOnly": false
"dependencyOnly": false,
"type": "xbd"
},
{
"groupId": "com.google.auto.value",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ private static void ConvertLicenses (BindingConfig config, MavenArtifactConfig m
license.Text = File.ReadAllText (license_file);
}

// Ensure we use Xamarin.Build.Download for any proprietary licenses
if (projectModel.Type != BindingType.XamarinBuildDownload)
foreach (var l in projectModel.Licenses)
if (l.LicenseConfig.Proprietary)
exceptions.Add (new Exception ($"Artifact '{mavenArtifact.GroupAndArtifactId}' has proprietary license '{l.Name}' and must use the `xbd` artifact type."));
}

static Collection<License> FindLicenses (BindingConfig config, MavenArtifactConfig mavenArtifact, Project mavenProject)
Expand Down

0 comments on commit 12743c4

Please sign in to comment.