diff --git a/build.gradle b/build.gradle index 49d66e4..cba5b61 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { id 'com.github.johnrengelman.shadow' version '7.0.0' } -def pluginVersion = '1.5.8' +def pluginVersion = '1.5.9' group = 'com.guardsquare' version = pluginVersion diff --git a/changelog.md b/changelog.md index af725cf..4bb390d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## v1.5.9 - [224-06-06] +- Fix configuration ambiguity by changing configuration similarity criteria to only consider key attributes. + ## v1.5.8 - [224-06-03] - Fix configuration ambiguity by using the same configuration for APKs and AABs. diff --git a/src/main/kotlin/com/guardsquare/appsweep/gradle/AppSweepPlugin.kt b/src/main/kotlin/com/guardsquare/appsweep/gradle/AppSweepPlugin.kt index d4eb7fc..814dbc6 100644 --- a/src/main/kotlin/com/guardsquare/appsweep/gradle/AppSweepPlugin.kt +++ b/src/main/kotlin/com/guardsquare/appsweep/gradle/AppSweepPlugin.kt @@ -277,11 +277,11 @@ class AppSweepPlugin : Plugin { /** * Check if a configuration similar to **toCopy** configuration exists such that - * its name start with "customConfig" return it. Otherwise, create custom configuration + * its name start with "customConfig", return it. Otherwise, create a custom configuration * based on **toCopy** configuration. * * @param project project to create a configuration for. - * @param toCopy configuration to copy. + * @param toCopy configuration to copy attributes, dependencies, and description from. * * @return existing or new configuration */ @@ -307,7 +307,7 @@ class AppSweepPlugin : Plugin { /** * Returns the configuration from `configurations` if `targetConfig` exists and its name starts with - * **customConfig**. If no such configuration is found, returns `null`. + * **customConfig**. If no such configuration exists, returns `null`. * * The prefix *customConfig* indicates that the configuration was created by the AppSweep Gradle plugin. * @@ -321,7 +321,7 @@ class AppSweepPlugin : Plugin { return configurations.firstOrNull { config -> config.name.startsWith("customConfig") && config.description == targetConfig.description && - config.attributes == targetConfig.attributes && + config.attributes.keySet() == targetConfig.attributes.keySet() && dependenciesMatched(config.allDependencies, targetConfig.allDependencies) }