Can a plugin add JS or CSS to the control panel in Craft 3? I want entries in a specific PlainText field for a named group to be pre-filled with random content. I am aware of the https://github.com/lukeyouell/craft-randomkeygenerator plugin and am aware that I could create my own field type, but I am intending to use jQuery to do this instead (which should be easier).

This Can a plugin add JS or CSS to the control panel? describes how to do this in Craft 2 (I assume that the code works). My equivalent in Craft3 is... 

class MyPlugin extends Plugin {
    if (Craft::$app-&gt;request-&gt;getIsCpRequest())
    {
      Craft::$app-&gt;templates-&gt;includeJs('alert("xxx")');
    }
}


but $app->templates does not work. So is there a Craft3 equivalent of this line?

NB: I have already written a plugin that is adding a file volume (for encrypting files uploaded as Assets) so intend to add to that.
You should be able to do this with Asset Bundles. Full documentation on this is here.