This update of the Kotlin kernel for Jupyter Notebook primarily targets library authors and enables them to easily integrate Kotlin libraries with Jupyter notebooks. It also includes an upgrade of the Kotlin compiler to version 1.5.0, as well as bug fixes and performance improvements.
As you may know, it was already possible to integrate a library by creating a JSON file, which we call a library descriptor. In the kernel repository, we have a number of predefined descriptors. You can find the full list of them here.
Creating library descriptors is rather easy. Just create a JSON file and provide a description
section with a library description and a link
section with a link to the library’s web page. Then add the repositories
and dependencies
sections, describing which repositories to use for dependency resolution and which artifacts the library includes. You can also add an imports
section, where you list imports that will be automatically added to the notebook when the descriptor is loaded, such as init
and initCell
code snippets, renderers,
and so on. When you are finished, save the created file and refer to it from the kernel in whatever way is most convenient for you. In this release, we’ve added some more ways to load descriptors. You can read more about how to create library descriptors here.
This method for integrating libraries is still supported and works particularly well when you are not the author of the library you want to integrate. But it does have some limitations:
%use B
.#kotlin