Since the Android kernel is under the General Public License, manufacturers are required to publish any modifications they make. Motorola has been producing quite a few phones lately, and to the company's credit, the kernel source code for each phone has been released in a mostly-timely manner.
Earlier today, the kernel source for the Moto X4 was released. This makes it easier for developers to create custom ROMs and other modifications for the phone. In case you were wondering, I'm not entirely sure if this covers both the 'normal' and Android One variants. The code tag simply says 'Payton,' which is the codename for all the X4 models.