HomeTech PlusTECH & OTHER NEWSGoogle: This Kotlin tool will help your Android apps build faster

Google: This Kotlin tool will help your Android apps build faster

Google has announced an alpha version of its Kotlin Symbol Processing (KSP) tool for building compiler plugins in the modern application development language, Kotlin.

KSP is compatible with Kotlin 1.4.30, which Czech software developer firm JetBrains released last week as a precursor to Kotlin 1.5.0

Kotlin has been endorsed by Google as a language for developing Android apps. Kotlin is now used by over 60% of professional Android developers and is an alternative to building apps with Java: Google engineers wrote about 30% of the Google Home app in Kotlin after translating it from legacy Java code.

SEE: Hiring Kit: Python developer (TechRepublic Premium)

According to Google, the top request from Kotlin developers is to speed up build times during compilation.

“Many developers iterate on and deploy apps dozens of times a day, so having to sit around waiting for a slow build can be very time consuming,” said Google’s Ting-Yuan Huang and David Winer

One of the biggest challenges with compiling Kotlin code is that Kotlin doesn’t have a native annotation processing system, while annotation processors like Room are commonly used on Android and rely on Java annotation processing compatibility through the Kotlin Annotation Processing Tool (KAPT). 

KAPT, however, can be held back by intermediate Java stubs that need to be ingested by the Java annotation processing system, something that KSP tackles.

“KSP offers a powerful and yet simple API for parsing Kotlin code directly, dramatically reducing the build speed tax imposed by KAPT’s stub generation,” note Huang and Winer.  

Google claims initial benchmarks with the Room library show that KSP is approximately twice as fast as KAPT.

“This is the goal of KSP: most Android app developers don’t need to worry about its internals; other than this one line change, a library that supports KSP looks just like a normal annotation processor, only it’s up to 2x faster.”

SEE: Developer: Rust programming language is being used for bigger projects

Google expects developers of Android libraries and software modules to adopt its KSP annotation processors and replace KAPT. 

For now, KSP partially supports Room, and experimentally supports Moshi. Also in sights are Auto Factory, Dagger, Hilt, and Gilde, but none of the latter are supported yet. 

“For library authors, now that KSP is in alpha, it’s a great time to start looking closely at it and giving us feedback on the API in the KSP issue tracker. In addition, we regularly post release updates in the #ksp channel on Kotlin Slack. Since the developer preview last June, we’ve closed over 100 bugs and issues, dozens of which have been reported by the amazing community of Kotlin library developers,” Huang and Winer note. 

By ZDNet Source Link

spot_img
Technology For You
Technology For Youhttps://www.technologyforyou.org
Technology For You - One of the Leading Online TECHNOLOGY NEWS Media providing the Latest & Real-time news on Technology, Cyber Security, Smartphones/Gadgets, Apps, Startups, Careers, Tech Skills, Web Updates, Tech Industry News, Product Reviews and TechKnowledge...etc. Technology For You has always brought technology to the doorstep of the Industry through its exclusive content, updates, and expertise from industry leaders through its Online Tech News Website. Technology For You Provides Advertisers with a strong Digital Platform to reach lakhs of people in India as well as abroad.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

spot_img
spot_img

CYBER SECURITY NEWS

TECH NEWS

TOP NEWS

TECH NEWS & UPDATES