July 2018
Intermediate to advanced
242 pages
8h 6m
English
As you can see, after running the Gradle build task, the AlertDialogApp.kt file is going to be translated into the app.js JavaScript code, available under the web/js directory, along with the kotlin.js file linked under the web/js/lib directory.
We can test the JS-generated code by running it in the web browser. In order to do so, we will create a sample HTML file under the project's main directory, named test_app.html, which is going to link the kotlin.js standard library file and run the app.js file that contains the main() function implementation generated from the AlertDialogApp.kt file:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Test</title></head><body> <script src="web/js/lib/kotlin.js"></ ...
Read now
Unlock full access