xamarin / AndroidX

AndroidX bindings for .NET for Android
MIT License
173 stars 42 forks source link

[binderator] Allow `extraDependencies` to specify an `excludedDependency`. #780

Closed jpobst closed 10 months ago

jpobst commented 10 months ago

Context: https://github.com/xamarin/AndroidX/pull/773

We have an artifact that specifies a dependency that we cannot automatically figure out the version to (likely due to unsupported parent POMs).

We would like to work around this by ignoring the bad dependency with excludedRuntimeDependencies, and then adding it back with extraDependencies, which will use the dependency version specified in the config file:

"groupId": "androidx.wear.protolayout",
"artifactId": "protolayout-expression",
"excludedRuntimeDependencies": "org.jetbrains.kotlin.kotlin-stdlib",
"extraDependencies": "org.jetbrains.kotlin.kotlin-stdlib",

However, the way we currently process this, the dependency gets excluded because the "excludes" are processed after the "extras".

Rework the logic so we run the "excludes" first and then add in the "extras".