SlideShare a Scribd company logo
1 of 19
Plugin and Play
PLUGINS THAT SUPPORT THE FULL SPECTRUM OF KOTLIN FEATURES
19-5-2022
by
Simone
de
Gijt
Introduction
Simone de Gijt
2016
2017
2018
2019
2020
2021
…
- Kotlin 1.0 released
- Started working in IT
Google announces that Kotlin is the preferred language of
Android app developers
- Signs contract @ OpenValue
- Starts working with Kotlin
Twitter: @de_gijt
What to
expect?
 Kover
 Code covarage
 Options
 Advantages / Disadvantages
 Ktlint
 Linter
 Options
 Adventages / Disadvantages
 Live demo of configurations
Twitter: @de_gijt
Kover
{kof· fer}
Kover - Gradle plugin for Kotlin code coverage agents:
IntelliJ and JaCoCo.
Twitter: @de_gijt
Code coverage
Twitter: @de_gijt
Options
 JaCoCo
Existing tool
Well-known and widely
recognized format
Has some quirks regarding
Kotlin
Twitter: @de_gijt
 IntelliJ IDEA
Available in IntelliJ IDEA
Handles Kotlin well
Only available in IntelliJ
IDEA
Twitter: @de_gijt
assertThat(service.greet(null))
.isEqualTo("Hello world")
Twitter: @de_gijt
Advantages Kover
 Provided by JetBrains
 Fully integrated with the Gradle toolchain and multiplatform projects.
 Kotlin Android support without the need to divide into build types and flavours
 Customizable filters for instrumented classes
 Handles specific Kotlin features
 Inline functions
 Directory structure
 …
Twitter: @de_gijt
Disadvantages
 Still in an experimental state
 Only available for Gradle (not Maven)
 Engine Jacoco doesn’t support Kotlin
Directory Structure
 Verification is only on LINE-level
Twitter: @de_gijt
Ktlint
{kitty· lint}
Ktlint - An anti-bikeshedding Kotlin linter with built-in
formatter
Twitter: @de_gijt
Linter
Twitter: @de_gijt
Advantages
 It saves time!
 It saves energy
 It simplifies your process
Twitter: @de_gijt
Plugin options
 JLLeitschuh:
 Gradle wrapper over
the pinterest project
 Adds special tasks
Twitter: @de_gijt
 Pinterest:
 Static code analysis
tool that is used to
analyse the Kotlin
code for you.
 Follows the official
Kotlin code style
 GantSign:
 Maven wrapper
over the
pinterest
project
Detekt
{de· tect}
Detekt - A static code analysis tool for
the Kotlin programming language.
Twitter: @de_gijt
Code smells
Twitter: @de_gijt
Demo
Twitter: @de_gijt
https://github.com/SimonedeGijt/
example-kover-ktlint-subprojects
https://github.com/SimonedeGijt/example-ktlint
https://github.com/SimonedeGijt/example-kover
Sources
 Kover – The Code Coverage Plugin
 https://kotlinlang.org/docs/multiplatform.html
 https://www.geeksforgeeks.org/code-formatting-in-kotlin-using-ktlint/
 https://blog.mindorks.com/code-formatting-in-kotlin-using-ktlint
 https://github.com/Kotlin/kotlinx-kover
 https://github.com/JLLeitschuh/ktlint-gradle
 https://github.com/pinterest/ktlint
 https://github.com/gantsign/ktlint-maven-plugin
 https://github.com/detekt/detekt
 https://megalinter.github.io/latest/installation/
Twitter: @de_gijt
Contact
Twitter:
@de_gijt
LinkedIn:
Simone de Gijt
Twitter: @de_gijt

More Related Content

Similar to PluginAndPlay-KotlinDevDay.pptx

Similar to PluginAndPlay-KotlinDevDay.pptx (20)

Android Development(Kotlin) 10.pptx
Android Development(Kotlin) 10.pptxAndroid Development(Kotlin) 10.pptx
Android Development(Kotlin) 10.pptx
 
Google i o developer conference 2019 round up flutter news and new updates_
Google i o developer conference 2019 round up  flutter news and new updates_Google i o developer conference 2019 round up  flutter news and new updates_
Google i o developer conference 2019 round up flutter news and new updates_
 
Android Study Jams- Hands on Experience!(Day 1)
Android Study Jams- Hands on Experience!(Day 1)Android Study Jams- Hands on Experience!(Day 1)
Android Study Jams- Hands on Experience!(Day 1)
 
Kotlin for android development
Kotlin for android developmentKotlin for android development
Kotlin for android development
 
Why You Should Go with Kotlin for Android App Development.pdf
Why You Should Go with Kotlin for Android App Development.pdfWhy You Should Go with Kotlin for Android App Development.pdf
Why You Should Go with Kotlin for Android App Development.pdf
 
Learn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdfLearn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdf
 
Kotlin - A Beginner’s Guide__________________
Kotlin - A Beginner’s Guide__________________Kotlin - A Beginner’s Guide__________________
Kotlin - A Beginner’s Guide__________________
 
Android studio 4.0 new features preview
Android studio 4.0 new features previewAndroid studio 4.0 new features preview
Android studio 4.0 new features preview
 
How does Kotlin app development company simplify android app development.pdf
How does Kotlin app development company simplify android app development.pdfHow does Kotlin app development company simplify android app development.pdf
How does Kotlin app development company simplify android app development.pdf
 
D8 Dexer
D8 Dexer D8 Dexer
D8 Dexer
 
Android Development with Kotlin course
Android Development  with Kotlin courseAndroid Development  with Kotlin course
Android Development with Kotlin course
 
Android with kotlin course
Android with kotlin courseAndroid with kotlin course
Android with kotlin course
 
AndroidMakers2023.pdf
AndroidMakers2023.pdfAndroidMakers2023.pdf
AndroidMakers2023.pdf
 
Android Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndroid Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - Introduction
 
MOOC_PRESENTATION_KOTLIN[1].pptx
MOOC_PRESENTATION_KOTLIN[1].pptxMOOC_PRESENTATION_KOTLIN[1].pptx
MOOC_PRESENTATION_KOTLIN[1].pptx
 
moocs_ppt.pptx
moocs_ppt.pptxmoocs_ppt.pptx
moocs_ppt.pptx
 
Kotlin tech talk
Kotlin tech talkKotlin tech talk
Kotlin tech talk
 
8 Reasons to Pick Kotlin Over Java for Android Development.pptx
8 Reasons to Pick Kotlin Over Java for Android Development.pptx8 Reasons to Pick Kotlin Over Java for Android Development.pptx
8 Reasons to Pick Kotlin Over Java for Android Development.pptx
 
Android study jam session 1
Android study jam   session 1Android study jam   session 1
Android study jam session 1
 
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
 

More from SimonedeGijt

More from SimonedeGijt (18)

Co-creating_between_UX_and_Software_Rabobank
Co-creating_between_UX_and_Software_RabobankCo-creating_between_UX_and_Software_Rabobank
Co-creating_between_UX_and_Software_Rabobank
 
Wired_Voxxed_Days_CERN_22-01-2024_Wired__
Wired_Voxxed_Days_CERN_22-01-2024_Wired__Wired_Voxxed_Days_CERN_22-01-2024_Wired__
Wired_Voxxed_Days_CERN_22-01-2024_Wired__
 
Wired_DevoxxBE_05102023.pptx
Wired_DevoxxBE_05102023.pptxWired_DevoxxBE_05102023.pptx
Wired_DevoxxBE_05102023.pptx
 
Co-creating with UX and Software Rabobank
Co-creating with UX and Software RabobankCo-creating with UX and Software Rabobank
Co-creating with UX and Software Rabobank
 
Wired_Rabobank_27062023.pptx
Wired_Rabobank_27062023.pptxWired_Rabobank_27062023.pptx
Wired_Rabobank_27062023.pptx
 
Wired_JoyOfCoding_21062023.pptx
Wired_JoyOfCoding_21062023.pptxWired_JoyOfCoding_21062023.pptx
Wired_JoyOfCoding_21062023.pptx
 
Wired_DDD-Europe_09062023.pptx
Wired_DDD-Europe_09062023.pptxWired_DDD-Europe_09062023.pptx
Wired_DDD-Europe_09062023.pptx
 
Co-creating_UX_Software_VoxxedDaysIasi.pdf
Co-creating_UX_Software_VoxxedDaysIasi.pdfCo-creating_UX_Software_VoxxedDaysIasi.pdf
Co-creating_UX_Software_VoxxedDaysIasi.pdf
 
Wired_DevoxxUK_10052023.pptx
Wired_DevoxxUK_10052023.pptxWired_DevoxxUK_10052023.pptx
Wired_DevoxxUK_10052023.pptx
 
Co-creating_UX_Software-DevoxxUK.pdf
Co-creating_UX_Software-DevoxxUK.pdfCo-creating_UX_Software-DevoxxUK.pdf
Co-creating_UX_Software-DevoxxUK.pdf
 
Wired_DevNexus_06042023.pptx
Wired_DevNexus_06042023.pptxWired_DevNexus_06042023.pptx
Wired_DevNexus_06042023.pptx
 
Wired_DevNexus_06042023.pptx
Wired_DevNexus_06042023.pptxWired_DevNexus_06042023.pptx
Wired_DevNexus_06042023.pptx
 
Wired_Javaland_22032023.pptx
Wired_Javaland_22032023.pptxWired_Javaland_22032023.pptx
Wired_Javaland_22032023.pptx
 
Co-creating_UX_Software_JFALL.pdf
Co-creating_UX_Software_JFALL.pdfCo-creating_UX_Software_JFALL.pdf
Co-creating_UX_Software_JFALL.pdf
 
Co-creating_UX_Software_DevoxxBE.pdf
Co-creating_UX_Software_DevoxxBE.pdfCo-creating_UX_Software_DevoxxBE.pdf
Co-creating_UX_Software_DevoxxBE.pdf
 
Wired_VoxxedCluj_06102022.pdf
Wired_VoxxedCluj_06102022.pdfWired_VoxxedCluj_06102022.pdf
Wired_VoxxedCluj_06102022.pdf
 
Co-creating_UX_Software_VoxxedAthens2022.pdf
Co-creating_UX_Software_VoxxedAthens2022.pdfCo-creating_UX_Software_VoxxedAthens2022.pdf
Co-creating_UX_Software_VoxxedAthens2022.pdf
 
Wired_JSpring_08062022.pptx
Wired_JSpring_08062022.pptxWired_JSpring_08062022.pptx
Wired_JSpring_08062022.pptx
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

PluginAndPlay-KotlinDevDay.pptx

Editor's Notes

  1. ~
  2. László Kövér is a Hungarian politician and the current speaker of the National Assembly of Hungary. Kover is pronounced the same as the Dutch word for suitcase. https://github.com/Kotlin/kotlinx-kover
  3. Source: Kover – The Code Coverage Plugin https://www.youtube.com/watch?v=jNu5LY9HIbw
  4. Sources: Kover – The Code Coverage Plugin https://www.youtube.com/watch?v=jNu5LY9HIbw https://github.com/Kotlin/kotlinx-kover https://kotlinlang.org/docs/multiplatform.html
  5. Source: https://www.geeksforgeeks.org/code-formatting-in-kotlin-using-ktlint/
  6. Sources https://blog.mindorks.com/code-formatting-in-kotlin-using-ktlint https://github.com/JLLeitschuh/ktlint-gradle https://github.com/pinterest/ktlint https://github.com/gantsign/ktlint-maven-plugin https://megalinter.github.io/latest/installation/ JLLeitschuh: The plugin can be applied to any project, but only activates if that project has the kotlin plugin applied Check tasks support change files to be checked incrementally. On the first run, the task will check all files in the source set, on subsequent runs it will check only added/modified files. IntelliJ IDEA: recommended to work with the ktlint install from brew
  7. ComplexCondition
  8. Demo Kover: Start with JaCoCo Show you can not see the class in the report (because of directory structure) Show inline function is not ”covered” Show IntelliJ Add Kover to the plugins Run report Open as HTML and show that you now can see the class-file including the coverage of the inline function Show that test classes are also tested by default Unmute integrationtests -> no additional config like with jacoco Standard: test is without Kover -> add config Show that you can exclude classes from Kover (both extension + report) Show kover config koverVerify Maybe subprojects (merged reports) Demo ktlint: Basic project without a lint; show format-error in service -> build -> no issues Add ktlint (normal plugin) to project: show all new tasks Show that if you only want intellij idea tasks you can add -idea in the plugin: build, after ktlintCheck 2 options: Create baseline: ktlintGenerateBaseline Format via: ktlintFormat / option+command+l Git integration: addKtlintCheckGitPreCommitHook addKtlintFormatGitPreCommitHook Add plugin Nick Badal Actions on save Additional config file: Without editorconfig file or ktlint plugin the rules of preferences are applied (KOTLIN) You can overwrite this by the editorconfig file (no extra config needed) Source: https://medium.com/@vanniktech/writing-your-first-ktlint-rule-5a1707f4ca5b