Skip to content
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 ability to set Configuration for licensee #75

Open
lhwdev opened this issue Jan 4, 2022 · 3 comments
Open

Add ability to set Configuration for licensee #75

lhwdev opened this issue Jan 4, 2022 · 3 comments

Comments

@lhwdev
Copy link

lhwdev commented Jan 4, 2022

I have one copy-pasted dependency which is not (should not) included in configuration, but I need it to included in information so that it is validated and included into artifacts.json.
I think it would be great if I:

  • can add custom dependency, like
    licensee {
      addDependency("a:b:c")
    }
    (but this seems hard to implement and has poor extensibility)
  • can set Configuration that is used to validate licenses.
    // do custom stuff with myConfiguration
    licensee {
      /* this. */ extraConfigurations += project.configurations["myConfiguration"] // or extraConfiguration = ...
    }
    This dummy configuration is only used for licensee, not used for dependencies or something.
@JakeWharton
Copy link
Member

Hmm the proposed DSL doesn't really scale to the different usages of the plugin. In projects with Android, Kotlin multiplatform, or the combination of both there is a matrix of configurations which are used and sourced from the plugins themselves.

I'll have to think about this case.

@lhwdev
Copy link
Author

lhwdev commented Jan 4, 2022

I see. So, how about combining the extra configurations, like

  • common configuration
  • Android specific one
  • KMP one

So if you use KMP + Android, you get all three configurations above combine.
Eventually just adding two List<Configuration>.
I think replacing original configuration is not needed(we have ignoreDependency), so we only need to do this for extra configurations.

@hfhbd
Copy link
Contributor

hfhbd commented May 3, 2023

This is now possible by creating your own licensee tasks by using the configrationToCheck function, see #191.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants