# Client extensions targeting multiple companies

**URL:** <https://discuss.liferay.com/t/client-extensions-targeting-multiple-companies/976>\
**Category:** Client Extensions\
**Created:** [September 23, 2026, 2:33pm UTC](https://discuss.liferay.com/t/client-extensions-targeting-multiple-companies/976 "2026-09-23T14:33:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elindoorn](https://dub1.discourse-cdn.com/flex014/user_avatar/discuss.liferay.com/elindoorn/32/356_2.png) [@elindoorn](https://discuss.liferay.com/u/elindoorn)\
**Post date:** [September 23, 2026, 2:33pm UTC](https://discuss.liferay.com/t/client-extensions-targeting-multiple-companies/976/1 "2026-09-23T14:33:08Z")

</div>

The client extension modules allow for specifying a target company in a multi-instance portal using a deprecated property `dxp.lxc.liferay.com.virtualInstanceId` within client-extension.yaml. This property is deprecated and we’re supposed to use the `liferay.virtual.instance.id` gradle property to target companies (see [Working with Client Extensions - Liferay Official Documentation - Liferay Learn](https://learn.liferay.com/w/dxp/development/client-extensions/working-with-client-extensions) ) ; however this doesn’t seem to keep in mind that there may be multiple client extensions targeting different and multiple companies.

The solution in the deprecated mechanism is quite elegant and simply having one client-extension.yaml with multiple definitions of the same client extension targeting multiple companies.

How is this supposed to be solved using gradle properties (which are supposed to be project wide config)? Has anyone solved this for their project?

---

<div class="post-metadata">

**Author:** ![Tim\_Pak](https://dub1.discourse-cdn.com/flex014/user_avatar/discuss.liferay.com/tim_pak/32/801_2.png) [@Tim\_Pak](https://discuss.liferay.com/u/Tim_Pak)\
**Post date:** [October 1, 2026, 8:18am UTC](https://discuss.liferay.com/t/client-extensions-targeting-multiple-companies/976/2 "2026-10-01T08:18:46Z")

</div>

Hey elindoorn, thanks for raising this concern. I can bring this up internally with the team and get back to you. Would you be able to provide more information on what type of client extensions you’re using?

---

<div class="post-metadata">

**Author:** ![elindoorn](https://dub1.discourse-cdn.com/flex014/user_avatar/discuss.liferay.com/elindoorn/32/356_2.png) [@elindoorn](https://discuss.liferay.com/u/elindoorn)\
**Post date:** [October 1, 2026, 6:38pm UTC](https://discuss.liferay.com/t/client-extensions-targeting-multiple-companies/976/3 "2026-10-01T18:38:51Z")

</div>

Hi Tim\_Pak,

We have about 10 portal instances, with different functionality on each. some (customElement) client extensions target only company A; an editorConfigContributor only targeting B, a combi of globalJS/globalCSS targetting 3 companies, some targeting basically all instances; themeCSS targeting company E, etc.

---

<div class="post-metadata">

**Author:** ![Tim\_Pak](https://dub1.discourse-cdn.com/flex014/user_avatar/discuss.liferay.com/tim_pak/32/801_2.png) [@Tim\_Pak](https://discuss.liferay.com/u/Tim_Pak)\
**Post date:** [October 2, 2026, 4:29pm UTC](https://discuss.liferay.com/t/client-extensions-targeting-multiple-companies/976/4 "2026-10-02T16:29:41Z")

</div>

Hey elindoorn,

Thanks for sharing your use case with us. For now, we recommend using a custom script that maps each virtual instance to the client extension projects it should receive and loop through them to target deploy. This can be done via Gradle using the `GradleBuild` task type, or via a shell script to wrap each `gradlew` invocation.

We’ll look into a long term solution to cleanly handle targeting multiple virtual instances.
