Skip to content

Commit

Permalink
Only consider key attributes for configuration similarity criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
foadjn committed Jun 7, 2024
1 parent 7584503 commit 9517368
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ class AppSweepPlugin : Plugin<Project> {

/**
* 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
*/
Expand All @@ -307,7 +307,7 @@ class AppSweepPlugin : Plugin<Project> {

/**
* 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.
*
Expand All @@ -321,7 +321,7 @@ class AppSweepPlugin : Plugin<Project> {
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)

}
Expand Down

0 comments on commit 9517368

Please sign in to comment.