3.8 Adding the Kotlin Extensions Plugin
The next section will add some code to the project so that a currency conversion occurs when the button is tapped and the result displayed to the user. Before adding this code, however, we first need to add a plugin to the project build configuration which will make it easier for us to reference the user interface widgets from within the Kotlin code. To do this, begin by opening the module level build.gradle file located in the project tool window (app -> Gradle Scripts - > build.gradle (Module: AndroidSample.app)) as shown in Figure 3-23:
Figure 3-23
Once opened, modify the plugins section so that it reads as follows:
plugins {
id 'com.android.application
id 'kotlin-android'
id 'kotlin-android-extensions'
}
Finally, click on the Sync Now link highlighted in Figure 3-24 below to commit the change and update the project...