Sony Mobile has published the AOSP build instructions for Android 9.0 Pie. This means that if you have a supported device, and are a developer, you will be able to use these instructions to help create your own custom ROMS. There is a full list of compatible devices below.
Step-by-step instructions to build and flash AOSP to your device can be found here. Remember you will need to unlock your bootloader before you go through these steps, which will wipe your DRM keys.
Sony Mobile supported devices for AOSP
Xperia Touch (G1109)
Xperia X Compact (F5321)
Xperia X Performance (F8131)
Xperia X Performance Dual (F8132)
Xperia X (F5121)
Xperia X Dual (F5122)
Xperia XA2 (H3113)
Xperia XA2 Dual (H4113)
Xperia XA2 Ultra (H3213)
Xperia XA2 Ultra Dual (H4213)
Xperia XZ1 Compact (G8441)
Xperia XZ1 (G8341)
Xperia XZ1 Dual (G8342)
Xperia XZ Premium (G8141)
Xperia XZ Premium Dual (G8142)
Xperia XZ (F8331)
Xperia XZ Dual (F8332)
Xperia XZs (G8231)
Xperia XZs Dual (G8232)
Via XDA.
Thanks Diogo!