devsoap / ds-gradle-vaadin

Gradle plugin for building Vaadin Flow 10/11/12/13/14/15 apps
https://devsoap.com/gradle-vaadin-flow-plugin
Other
36 stars 13 forks source link

Add whitelist class scanning strategy (#309) #310

Closed johndevs closed 4 years ago

johndevs commented 4 years ago

Adds a new scanning strategy 'whitelist' which allows you to find all instances of annotated classes in the classpath. This might be required if the @Route classes does not directly reference components (for instance in the case of IOC frameworks.

Since when using the 'whitelist' scanning strategy all components which conforms to the whitelist will be included in the bundle it is recommended to manually configure the vaadin.whitelistedPackages property so that it only lists packages which has the wanted components in the bundle.

For example:

vaadin.scanStrategy = 'whitelist'
vaadin.whitelistedPackages = [
        'com.vaadin.flow.component.orderedlayout',
        'my.project.root.package'
]

Would only include the ordered layouts as well as your project packages.