-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add filtering option for excluding specific configuration name #25
Add filtering option for excluding specific configuration name #25
Conversation
@@ -7,4 +7,6 @@ dependencies { | |||
implementation(project(":sample:beta")) | |||
implementation(project(":sample:container:gama")) | |||
implementation(project(":sample:container:delta")) | |||
|
|||
testImplementation(project(":sample:test")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added for checking ignoring option.
I executed command below and checked README.md hasn't changed.
./gradlew :sample:createModuleGraph
@iurysza Is there any chance to get reviewed ?? |
Hey @omuomugin, thanks for the PR. |
@iurysza Have you got time for review? I'm open for discussion, so let me know your thoughts. |
README.md
Outdated
@@ -166,6 +166,8 @@ Optional settings: | |||
- `NONE`: No text added. (Default.) | |||
- `CONFIGURATION`: The name of the configuration which the dependency belongs to (e.g. " | |||
implementation", "compileOnly", "jsMain"). | |||
- **excludeConfigurationNames**: | |||
- List of configuration name which should be ignored. e.g. "implementation", "testImplementation". Default is emptyList(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- List of configuration name which should be ignored. e.g. "implementation", "testImplementation". Default is emptyList(). | |
- List of configurations to be ignored. e.g. "implementation", "testImplementation". Default is emptyList(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As #25 (comment), #25 (comment) says
Maybe it should be "List of configuration names to be ignored" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 73b5e93
@@ -47,6 +48,11 @@ abstract class CreateModuleGraphTask : DefaultTask() { | |||
@get:Optional | |||
abstract val linkText: Property<LinkText> | |||
|
|||
@get:Input | |||
@get:Option(option = "excludeConfigurationNames", description = "List of configuration name which should be ignored") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@get:Option(option = "excludeConfigurationNames", description = "List of configuration name which should be ignored") | |
@get:Option(option = "excludeConfigurationNames", description = "List of configurations names to be ignored") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 73b5e93
@@ -44,6 +45,13 @@ open class ModuleGraphExtension @Inject constructor(project: Project) { | |||
*/ | |||
val linkText: Property<LinkText> = objects.property(LinkText::class.java) | |||
|
|||
/** | |||
* List of configuration name which should be ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* List of configuration name which should be ignored. | |
* Configuration names to be ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As #25 (comment), #25 (comment) says,
Maybe it should be "List of configurations to be ignored" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 73b5e93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @omuomugin , this looks fine by me. Just some wording nitpicks.
Cheers
@@ -166,6 +166,8 @@ Optional settings: | |||
- `NONE`: No text added. (Default.) | |||
- `CONFIGURATION`: The name of the configuration which the dependency belongs to (e.g. " | |||
implementation", "compileOnly", "jsMain"). | |||
- **excludeConfigurationNames**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an example of usage in the code blocks above. Like here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added 2587876
This will be part of the |
@iurysza |
π Description
Try to add
excludeConfigurationNames
option which you can ignore specific configuration names.Fix #21
example usage is below
π Motivation and Context
I have same situation as #21 .
I know @iurysza is writing POC with Regex seeing https://github.com/iurysza/module-graph/tree/regex-filter .
However as #21 stated, I think there is a major case that want to ignore specific configuration (especially
testImplementation
) for document use.I'm open to discuss about this feature so just let me know your opinion.
π§ͺ How Has This Been Tested?
Added some test cases for
ModuleGraphPluginFunctionalTest
And also tested with sample project.
π¦ Types of changes
β Checklist