Package 

Class GradleKpmFragmentFactory

  • All Implemented Interfaces:
    org.gradle.api.NamedDomainObjectFactory

    
    public final class GradleKpmFragmentFactory<T extends GradleKpmFragment>
     implements NamedDomainObjectFactory<T>
                        

    Factory used by GradleKpmModule to polymorphic-ally create fragments/variants. Fragments are created in two stages with this factory:

    FragmentInstantiator: An Instantiator (unlike something called a 'Factory') will just provide a new instance. All objects referenced from the Fragment shall be already created and accessing them should be safe, whilst some additional configuration still hase to be done in the configuration step.

    FragmentConfigurator: After the fragment is instantiated, additional configuration (depending on the fragment instance) can be done. Typical configurations are:

    • Further setting up attributes of configurations (based upon the fragment itself)

    • Setting up additional Gradle tasks

    • Setting up publication