Supporting AUI7 and AUI8

We’re updating some components of our app and AUI8 is used in Confluence 7.0+ This has breaking changes for forms that impact us. Is there a common way to detect and adjust what we’re doing based on AUI version? We understand we can make something, but we’re hoping for a shared solution with other vendors.