Auto Added by WPeMatico

Kotlin Roundup: Unveiling the New Compose Multiplatform Release, Amper Update, and More!

In this roundup, we invite you to explore the highlights of what has happened in the Kotlin ecosystem lately.

Continue ReadingKotlin Roundup: Unveiling the New Compose Multiplatform Release, Amper Update, and More!

Become a Kotlin Google Summer of Code Contributor: Make an Impact!

The Kotlin Foundation has been accepted as a mentor organization for Google Summer of Code 2024! 

GSoC is a global online program focused on bringing new contributors into open-source software development. Contributors work on a 12-week programming project under the guidance of Kotlin Foundation mentors from Google, Gradle, and JetBrains.

What does this mean for you? 

As a potential contributor, this is your chance to explore open-source development with Kotlin. If you are a student or a beginner, GSoC offers an opportunity to work on meaningful projects, gain hands-on experience, and connect with mentors from the Kotlin community.

Why participate? 

By joining us for GSoC 2024, you’ll have the chance to:

  • Gain real-world development experience and enhance technical skills.
  • Contribute to a real Kotlin project with a global impact and play a part in expanding the Kotlin ecosystem.
  • Learn from experienced mentors and connect with the Kotlin community.
  • Receive a stipend and build your resume.

How do I get started?

  • Explore the exciting projects we have lined up and check out our GSoC guidelines.
  • Find a project that interests you and send questions to the potential mentors in Slack to prepare your application.
  • Between March 18 and April 2, apply via the GSoC website. Don’t forget to include a code sample and tell us why you’re passionate about Kotlin!

Resources

Project ideas

Here’s a sneak peek at the projects we have in store this year:

  • Incremental compilation for the Kotlin-to-WebAssembly compiler
  • Compose Multiplatform with Node.js native bindings for Skia
  • Compose Multiplatform component gallery generator
  • Kotlin DSL improvements for declarative Gradle
  • Kotlin DSL documentation samples test framework
  • Gradle build server – support for Android projects
  • Implement memory usage profiling for Kotlin/Native benchmarks
  • Support Android target in kotlinx-benchmark
  • Enabling click-to-run for kotlinx-benchmark benchmarks in IntelliJ IDEA

Read more about the projects

Thank you for your interest in Google Summer of Code with Kotlin. Let’s make this summer a memorable one for Kotlin!

Continue ReadingBecome a Kotlin Google Summer of Code Contributor: Make an Impact!

Advent of Code in Kotlin: Celebrating Our Participants and Their Solutions

A big thank you goes out to everyone who joined us for Advent of Code in Kotlin this year! We’re thrilled that JetBrains was a part of this yearly tradition once again as one of the Advent of Code sponsors.

From December 1 through 12, we shared daily livestreams of puzzle solutions presented by our host Sebastian Aigner and his fantastic guests. If you missed any of the action, you can watch the recordings on our YouTube playlist. Dive into Kotlin discussions, learn something new, and enjoy the good vibes:

This year, we again threw the challenge to the community, inviting you all to solve puzzles using Kotlin – and the response was phenomenal!

Here’s a quick recap:

  • 1,400 repositories were labeled with the “aoc-2023-in-kotlin” topic and were therefore included in the challenge.
  • We featured a total of 12 guests on our 12 daily livestreams.

We invited everyone to join one of our leaderboards and start solving the Advent of Code puzzles in Kotlin. Now, we’d like to take a moment to congratulate our 15 standout winners, who will soon be receiving some exclusive prizes!

Here are the top five performers from the combined Kotlin leaderboards, which had a total of 1,320 participants:

These five winners were selected randomly from the 1,400 repositories:

And here are our community stars:

A massive round of applause to all our participants and winners, and a special thank you to Eric Wastl and the entire Advent of Code organizational team!

We hope you had fun, and we’re looking forward to seeing you all for the next edition of Advent of Code in Kotlin! Meanwhile, check out the following links and keep exploring the language:

Continue ReadingAdvent of Code in Kotlin: Celebrating Our Participants and Their Solutions

Kotlin/Wasm in Alpha, a KMP Project Migration Tutorial by Philipp Lackner, and Other Kotlin News

Catch up on the highlights of what happened in the Kotlin ecosystem in December and January!

Kotlin for WebAssembly goes Alpha

Kotlin for WebAssembly goes Alpha

Kotlin/Wasm, the newest Kotlin Multiplatform target platform, has reached Alpha status! This means that Kotlin/Wasm is ready for you to use in pre-production scenarios. It still has many areas that are works in progress, and we continue to rely on the community to help inform and prioritize the decisions influencing Kotlin/Wasm.

Additionally, Compose Multiplatform for the web (currently experimental) leverages Kotlin/Wasm. Together, the two technologies enable developers to create declarative user interfaces for web applications entirely in Kotlin.

Explore Kotlin/Wasm

"Kotlin and WebAssembly: Unleashing Cross-Platform Power" livestream

If you want to see Kotlin/Wasm in action, watch the recording of our livestream: Kotlin and WebAssembly: Unleashing Cross-Platform Power. In it, you’ll see:

  • How Kotlin code is compiled to WebAssembly.
  • The performance benefits of using WebAssembly.
  • How to build a UI using Compose Multiplatform compiled with the Kotlin/Wasm toolchain.
  • Practical examples of how Kotlin/Wasm can be used to build web apps showcased by Zalim Bashorov, Team Lead for Kotlin/Wasm.

Watch now

KotlinConf’24 is 90% sold out!

Secure your spot at KotlinConf 2024!

Don’t miss out on the world’s largest Kotlin event. Anticipate exciting keynote speeches, sessions, and workshops presented by industry experts and passionate Kotlin enthusiasts. Participants will have the opportunity to explore the most recent developments, adopt best practices, and learn from success stories. Join us at Copenhagen’s beautiful Bella Center on May 22–24!

Get your ticket

If you’re planning to attend KotlinConf this year, you might be interested in our Hands-On Kotlin Web Development with Ktor workshop. In this full-day workshop, Anton Arhipov, Developer Advocate at JetBrains, and Leonid Stashevsky, Team Lead for Ktor at JetBrains, will show you how to create a feature-complete application using Ktor, Exposed, and various Kotlin and Java libraries. For more details, check out the official KotlinConf 2024 website.

Save your spot

KotlinConf Global 2024: uniting Kotlin enthusiasts worldwide!

KotlinConf Global 2024: uniting Kotlin enthusiasts worldwide

KotlinConf Global is a series of meetups organized by the community to watch and discuss the keynote addresses and sessions at the conference. Become part of KotlinConf 2024 by hosting your own event!

Learn more

Kandy: the new Kotlin plotting library by JetBrains

Kandy: the new Kotlin plotting library by JetBrains

In December, the JetBrains team introduced Kandy, a new Kotlin plotting library. Boasting a user-friendly DSL, Kandy seamlessly integrates with Kotlin DataFrame and Kotlin Notebook, offering a cohesive approach to effortless chart creation.

Discover more about Kandy

How to migrate an Android project to Kotlin Multiplatform (video)

How to migrate an Android project to Kotlin Multiplatform (video)

Do you want to learn about how to migrate an Android project to Kotlin Multiplatform? Then, be sure to watch this deep-dive video tutorial by Philpp Lackner. In this session, Philipp walks you through the process of taking your existing native Android project in Android Studio and migrating it to Kotlin Multiplatform, so that you can use the app on iOS as well.

Watch the session

Amper Update: highlights of user feedback and our plans

Amper, a new tool by JetBrains to improve the project configuration user experience.

Amper is a new tool by JetBrains to improve the project configuration user experience. Since its release last November, we’ve received a lot of feedback from the community and have continued our development work as well. Check out some of the highlights of what we’ve heard from you and a little about where we’re headed next in our blog post.

Read on

Results of Google Summer of Code with Kotlin

Results of Google Summer of Code with Kotlin

2023 marked Kotlin’s first-ever participation in Google Summer of Code (GSoC), a global online program focused on bringing new contributors into open-source development. Contributors worked on 12-week programming projects with the Kotlin Foundation under the guidance of mentors from JetBrains, Google, and Gradle.

Here is the final list of projects that we worked on last summer, along with reviews from mentors and contributors:

Read the blog post

Continue ReadingKotlin/Wasm in Alpha, a KMP Project Migration Tutorial by Philipp Lackner, and Other Kotlin News

Results of Google Summer of Code With Kotlin

2023 marked Kotlin’s first-ever participation in Google Summer of Code (GSoC), a global online program focused on bringing new contributors into open-source development. Contributors worked on 12-week programming projects with the Kotlin Foundation under the guidance of mentors from JetBrains, Google, and Gradle, and gained experience on real-world projects. We would like to share the results achieved during GSoC 2023.

We kicked off the program in March with a lineup of diverse projects, which reflected the versatility of Kotlin’s applications, and a call for proposals:

  • Kotlin Multiplatform protobufs
  • Kotlin Compiler error messages
  • Groovy to Kotlin Gradle DSL converter
  • Eclipse Gradle KTS editing
  • Improve support for parameter forwarding in the Kotlin plugin for IntelliJ IDEA
  • Enhance the kotlinx-benchmark library API and user experience
  • Parallel stacks for Kotlin Coroutines in the debugger

We received 65 high-quality proposals from potential contributors.

After careful evaluation, mentors and organization admins selected the top 5 contributors to work on projects that promised to make a significant impact on the Kotlin community. Halfway through the program, one of the selected contributors withdrew from the “Improve support for parameter forwarding in the Kotlin plugin for IntelliJ IDEA” project, so the final list shrank to 4 projects.

Here is the final list of projects that we worked on last summer, along with reviews from mentors and contributors:

Kotlin Multiplatform library version of Flogger

Enhance the kotlinx-benchmark library API and user experience

Eclipse Gradle KTS editing

Parallel stacks for Kotlin coroutines in the debugger

We’re grateful to everyone who participated in Google Summer of Code with the Kotlin Foundation. We are determined to make participating in GSoC a tradition.

Thank you for being a part of this journey with us!

Continue ReadingResults of Google Summer of Code With Kotlin

KotlinConf Global 2024: Uniting Kotlin Enthusiasts Worldwide!

KotlinConf Global returns next year, in May. This means that no matter where you are in the world, you can join us in celebrating all things Kotlin.

At KotlinConf 2024, you can expect a great lineup of keynotes, sessions, and workshops, delivered by industry experts and Kotlin enthusiasts. The attendees will be able to deep dive into the latest updates, best practices, and success stories.

Whether you’re a Kotlin developer, a team lead, or simply someone passionate about Kotlin, you’re sure to find something of interest to you. As we bring the global Kotlin community together, you’ll have the chance to network, collaborate, and forge new connections that can inspire you and elevate your work.

Buy Tickets

KotlinConf’24 Global

We encourage communities, companies, and campuses around the world to become part of KotlinConf 2024 by hosting their own events. By organizing a live broadcast of the conference with your local Kotlin community, you can recreate the excitement of being physically present at the event. Not only that, but you’ll also gain access to video recordings, allowing you to hold watch parties at a later date and enjoy the KotlinConf experience.

Host an Event

Event Support

To ensure your event is a success, our team is ready to provide support every step of the way. If you require guidance or have any questions about organizing your KotlinConf Global event, reach out to us at kug@jetbrains.com. We’re here to help make your event an unforgettable one.

To get support for your event, you should host it between May 23, 2024, and June 30, 2024. Make sure to announce it on your website or another suitable platform, such as meetup.com. The closing date for submissions is February 23, 2024.

Attend an Event

For those who can’t organize an event but still want to be part of the excitement, fear not. Stay tuned to our website and follow @kotlinconf on X (formerly Twitter) for updates on upcoming events.

As we bring the global Kotlin community together, you’ll have the chance to network, collaborate, and forge new connections that can inspire you and elevate your work.

Continue ReadingKotlinConf Global 2024: Uniting Kotlin Enthusiasts Worldwide!

Kotlin for WebAssembly Goes Alpha

Kotlin/Wasm, the newest Kotlin Multiplatform target platform, has reached Alpha status! Here’s what you need to know about this change at a glance:

  • JetBrains has promoted Kotlin/Wasm to Alpha, making it ready for you to try for yourself. Your feedback will help shape the future of building web applications with Kotlin!
  • As an Alpha release, Kotlin/Wasm is ready for you to use in pre-production scenarios, but it still has many areas that are works in progress. We rely on the community to help inform and prioritize the decisions influencing Kotlin/Wasm.
  • Compose for Web (currently experimental) is powered by Kotlin/Wasm. Together, the two technologies allow you to create declarative user interfaces for web applications in 100% Kotlin.

Get started with Kotlin/Wasm

WebAssembly: The newest Kotlin Multiplatform target

WebAssembly is establishing itself as the standard compilation target for languages targeting the browser – and beyond! With Kotlin/Wasm, we’re giving you the ability to make use of this new target via Kotlin Multiplatform. We first introduced Kotlin/Wasm in Kotlin 1.8.20 as an experimental technology, and have since improved and refined it.

Because Kotlin is an automatically memory-managed language, it builds on the garbage collection proposal, which recently reached phase 4 (standardization). That means it is now enabled by default in a number of major browsers. For example, recent versions of both Chrome and Firefox can run Kotlin/Wasm applications without any required adjustments. While Safari currently doesn’t support Wasm GC yet, implementation of the required functionality in JavaScriptCore is already underway.

Getting started with Kotlin/Wasm

Join the Kotlin/Wasm community

An easy way to get started with Kotlin/Wasm is to take a look at the Getting Started page. Here, you’ll find an overview of the technology and instructions on how to set up your own Kotlin/Wasm application. You’ll also see projects and links to example projects that show off different facets of Kotlin/Wasm, including those that illustrate how to use it in the browser, together with Compose Multiplatform, and more.

Kotlin/Wasm goes Alpha: explore the technology in detail and see example projects

The Kotlin Playground now also has support for Kotlin/Wasm, meaning you can write your first WebAssembly code snippets right in your browser, and explore what Kotlin/Wasm has to offer.

To help you go beyond your first “Hello World” examples with WebAssembly, we are also bringing the `kotlinx` suite of libraries to Kotlin/Wasm. This includes kotlinx-atomicfu, kotlinx.coroutines, kotlinx.serialization, kotlinx-datetime, and kotlinx-io.

Ktor, the JetBrains framework for building networked applications, is also coming to WebAssembly. With the next release, you’ll be able to use Ktor’s HTTP clients to make network requests right from your Kotlin/Wasm code.

Compose Multiplatform: Powered by Kotlin/Wasm

Kotlin/Wasm isn’t bound to any specific UI framework. It’s a general way of running your Kotlin code in the browser. However, it is the underlying technology for the experimental web target of Compose Multiplatform, the declarative multiplatform UI toolkit by JetBrains based on Google’s Jetpack Compose. Compose Multiplatform for Web uses canvas-based rendering, meaning that you can use the same layouts and components as you would on other platforms. Out of the box, it comes with the Material and Material 3 design components.

With Compose Multiplatform, you can build shared applications that target the most important platforms: Android and iOS, desktop, and – thanks to the power of Kotlin/Wasm – the browser. To start building your own shared UIs, you can generate a project using the Kotlin Multiplatform Web Wizard, which now also experimentally supports the Kotlin/Wasm target.

Performance

WebAssembly is designed from the ground up as a compilation target for languages, meaning the Kotlin compiler can convert your source code into performant WebAssembly bytecode. We regularly run benchmarks on Kotlin/Wasm to ensure its runtime performance. Since Kotlin/Wasm is still in Alpha, the team continues to work on performance improvements, but as you can see, Kotlin/Wasm already outperforms Kotlin/JS in almost all of our macro benchmarks:

Likewise, Compose Multiplatform running on Kotlin/Wasm already shows promising performance characteristics, with execution speed comparable to that of running the same application on the JVM:

AnimatedVisibility: Wasm takes a factor of 0.5 of the time of a JS implementation
LazyGrid: Wasm takes a factor of 0.5 of the time of a JS implementation
VisualEffects: Wasm takes a factor of 0.5 of the time of a JS implementation

These benchmark results come from our testing in a recent version of Google Chrome, but we observed similar results in other browsers we tested.

What’s in the works

As a technology in Alpha, Kotlin/Wasm is evolving rapidly, and the team is busy making improvements and enhancements. As such, there are still a number of areas that are works in progress.

Currently, the debugging support in Kotlin/Wasm is limited, and we’re working on improving its capabilities going forward. We’re also aware that bundle size is an important factor when it comes to targeting the web, and we want to further optimize the outputs generated by the compiler, especially for Compose Multiplatform projects.

As WebAssembly continues evolving, we want to take advantage of new proposals as they arrive – whether that’s stack switching, threading, or others. We’re also working on introducing support for the WebAssembly Component Model to Kotlin, which will enable you to build interoperable Wasm libraries and applications. We’re also still in the process of making Kotlin/Wasm an awesome target for development outside of the browser, including support for WASI, the WebAssembly System Interface. As a part of the WebAssembly Community Group, and by actively collaborating with vendors of WebAssembly VMs, we’re striving to ensure that Kotlin/Wasm provides a great experience no matter where you’re running it.

Our goal is to provide an excellent developer experience for you, and make sure that it meets your requirements in terms of performance and bundle size. As we make progress on these fronts, we’ll make sure to provide you with updates and share more information!

Join the community to get updates and share your feedback!

Join the Kotlin/Wasm community

If you want to connect with the team and other developers excited about Kotlin/Wasm, we invite you to join the discussion on the Kotlin Slack (get your invite here). In the #webassembly channel, you can find discussions about everything Kotlin and WebAssembly.

Kotlin/Wasm is in Alpha, and we want to make sure we continue evolving the technology based on your requirements. Help us help you by reporting problems, telling us about APIs that you feel are missing, and requesting features you’d like to see. You can do so by adding issues to the Kotlin YouTrack project.

We’re excited to take this next step with Kotlin and look forward to seeing what you’ll create with Kotlin/Wasm!

See Kotlin/Wasm in action!

On Tuesday, December 12, 2023, Kotlin/Wasm Team Lead Zalim Bashorov will present a live session entitled Kotlin and WebAssembly: Unleashing Cross-Platform Power on the official Kotlin YouTube channel! To make sure you don’t miss it, sign up to receive notifications.

See also

Continue ReadingKotlin for WebAssembly Goes Alpha

News Digest: Kotlin Multiplatform Special

November has been a busy and eventful month with a lot of exciting news and many updates in the Kotlin Multiplatform ecosystem. Catch up on all the highlights in our digest.

Kotlin Developer Survey

Kotlin Developer Survey #2: Share your opinion

We want to hear from Kotlin developers! Help us make Kotlin even better by completing this 10-minute survey and sharing your opinions about the language, libraries, IDEs, and build tools. By participating, you will also get the chance to win a one-year JetBrains All Products Pack subscription or a $100 Amazon Gift Card.

Take the survey

Kotlin Multiplatform is Stable and production-ready

Kotlin Multiplatform is Stable and production-ready

Kotlin Multiplatform (KMP) is an open-source technology built by JetBrains that allows developers to share code across platforms while retaining the benefits of native programming. KMP is now Stable and 100% ready for you to use in production. Read our blog post to learn about the evolution of the framework, how it can streamline your development process, and what educational resources are available for you to get the most out of the technology.

Explore KMP

Fleet with Kotlin Multiplatform tooling

The JetBrains team has launched a preview for Kotlin Multiplatform support in Fleet

The JetBrains team has launched a preview for Kotlin Multiplatform support in Fleet, which simplifies the development of multiplatform applications, adding to the already extensive Kotlin support in Fleet. Its features include:

  • Simplicity: Run configurations for Android and/or iOS are generated automatically.
  • Polyglot programming: You don’t have to switch to a different editor when working with native code in your multiplatform project.
  • Cross-language Swift-Kotlin support: Fleet provides cross-language сode navigation, refactoring, and debugging.

Learn more in our Welcome Fleet with Kotlin Multiplatform Tooling blog post and try out all of the great features Fleet provides.

Get started

Amper – Improving your build tooling user experience 

Amper – Improving your build tooling user experience

Amper is a new experimental project configuration tool focused on usability, onboarding, and IDE support. To sum it up, here’s a brief overview of all there is to know about this tool so far:

  • You can currently use Amper with Kotlin and Kotlin Multiplatform, though it also supports Java and Swift.
  • Implemented as a Gradle plugin, Amper uses YAML for its project configuration format.
  • You can try it out in JetBrains Fleet and IntelliJ IDEA.

For more details and examples, read our blog post about Amper and how it can improve your build tooling user experience.

Learn more about Amper

Kotlin 1.9.20 released

Koltin 1.9.20 released

Kotlin 1.9.20 and 1.9.21 have now been released! The main highlights of the 1.9.20 release include:

  • K2 is now in Beta for all supported targets.
  • Kotlin Multiplatform is Stable.
  • A new default hierarchy template is available for setting up multiplatform projects.
  • The Gradle configuration cache is fully supported in Kotlin Multiplatform.
  • The custom memory allocator is enabled by default in Kotlin/Native.
  • The garbage collector in Kotlin/Native performs significantly faster.

For the complete list of changes, see What’s new in Kotlin 1.9.20

Kotlin 1.9.21, meanwhile, addresses a variety of issues, including regression problems, and introduces kapt compatibility with JDK21.

Try the latest version

Compose Multiplatform 1.5.10 – The perfect time to get started

Compose Multiplatform 1.5.10 released

Compose Multiplatform is a declarative UI framework built by JetBrains that allows developers to share their applications’ UIs across different platforms. The 1.5.10 release of Compose Multiplatform provides support for Kotlin 1.9.20 and offers the following features:

  • Quicker and easier startup
  • New Material 3 components in common code
  • Enhanced TextFields on iOS
  • Crossfade animation for UIKit interoperability
  • Increased compilation speed
  • Basic support for the K2 compiler
  • Enhanced rendering performance on iOS
  • A new documentation portal

For more details about 1.5.10, read our blog post. Compose Multiplatform 1.5.11 is now also available, providing compatibility with Kotlin 1.9.21 and several fixes to ensure a more stable and reliable framework.

Update to the latest version

Kotlin Multiplatform development roadmap for 2024

Kotlin Multiplatform development roadmap for 2024

The JetBrains team is adding many awesome things to Kotlin Multiplatform to provide you with the best cross-platform development experience. Our plans for 2024 include:

  • Direct Kotlin-to-Swift export
  • Compose for iOS in Beta
  • A single IDE experience with Fleet
  • Improved KMP library publishing process

Delve into our updated roadmap to see what’s cooking.

Explore the roadmap

Livestream recordings

Kotlin Multiplatform Webinar November series

If you missed our educational livestreams, the recordings are now available to watch online. Enjoy the Kotlin Multiplatform Webinar November series to get insights directly from JetBrains experts!

Tackle Advent of Code 2023 with Kotlin and win prizes!

Tackle Advent of Code 2023 with Kotlin and win prizes!

Advent of Code is a great way to discover new Kotlin features, enhance your problem-solving skills, and engage with a fantastic community. Dive into 25 days of coding challenges at adventofcode.com for some friendly competition, valuable learning experiences, and the chance to win exclusive Kotlin prizes!

Learn more

Continue ReadingNews Digest: Kotlin Multiplatform Special

Tackle Advent of Code 2023 With Kotlin and Win Prizes!

Unwrap the joy of coding challenges as we gear up for Advent of Code, which JetBrains is proud to be sponsoring for a third consecutive year! Starting December 1, the JetBrains community will be diving into 25 days of coding challenges at adventofcode.com, and we warmly invite you to participate using Kotlin.

Advent of Code is a great way to discover new Kotlin features, enhance your problem-solving skills, and engage with a fantastic community. Take part for some friendly competition, valuable learning experiences, and the chance to win exclusive Kotlin prizes!

Watch on YouTube

Livestreams

Starting December 1, we’ll be holding livestreams every day at 5:00 pm UTC to discuss the puzzle of the day, giving you 12 hours to solve the puzzle before we go through it together. We’ll be joined by guests from the Kotlin team and the community to discuss possible approaches to the problems. It’s a great way to tackle the challenges together and learn some cool Kotlin tricks!

Community

Join the discussion in the Advent of Code channel on the Kotlinlang Slack, and share tips and tricks with other participants. Each day we’ll post a new thread where you can share your puzzle solutions. The most active community members will get some neat rewards!

Join Our Slack

Advent of Code Leaderboards

Take part in our dedicated Kotlin leaderboards. We’ll randomly pick several winners from among those who submit their solutions on GitHub, and the top scorers will also get some fantastic prizes.

Since the leaderboard space is limited and in high demand, we’ve created seven leaderboards to fit everyone interested. To join, head to the Leaderboard section in your Advent of Code profile and enter one of the codes below:

Leaderboard 1: 2553782-b2a92b30

Leaderboard 2: 3240090-7d776460

Leaderboard 3: 3240094-c8ce397b

Leaderboard 4: 3240651-e9dd79d4

Leaderboard 5: 3240655-edd1d88b

Please join only one leaderboard. Thank you!

Resources

We’ve compiled some useful Advent of Code resources to help you get in the spirit:

  • The Advent of Code in Kotlin GitHub template.
  • Previous years’ solutions to Advent of Code puzzles in idiomatic Kotlin.
  • The Tips and Tricks for Solving Advent of Code blog post.
  • The Algorithmic Challenges in Kotlin plugin-based course.

Template

Make the most of our GitHub template, which is designed to streamline the structure of your solutions. This repository template is specifically for use with Kotlin, and it offers a solid foundation for your solutions, allowing you to get set up quickly so you can dive right into the problems.

To create a new project with this template, simply log in to your GitHub account, follow the link below, and click the green Use this template button. Please do not fork it!

Use the template

Advent of Code in Kotlin Template

This is a fork of the main Advent of Code Kotlin Template repository that uses the Amper tool for project configuration, recently introduced by JetBrains. With this version, we swapped the standard Gradle build configuration with the module.yaml Amper file.

Prizes

For a chance to grab some fantastic prizes by participating in Advent of Code with Kotlin, be sure to follow these steps:

  • Tackle at least three days of Advent of Code 2023 challenges in Kotlin.
  • Share your solutions publicly on GitHub.
  • Have your contact details (email address or Twitter handle) available in your GitHub profile.
  • Follow the Advent of Code guidelines, which forbid you from using AI or LLMs to solve the puzzles.
  • Add the topic “aoc-2023-in-kotlin” to your repository.

To include the “aoc-2023-in-kotlin” topic in your repository, edit the repository details by clicking the gear icon in the top right-hand corner of the repository page. Next, in the topics field, add the value:

Advent of Code in Kotlin Topic

We genuinely appreciate everyone’s enthusiasm for this friendly competition! Our aim is to provide you with an enjoyable experience as you explore the beauty of solving holiday puzzles in idiomatic Kotlin.

Join us for Advent of Code 2023 with Kotlin for a chance to learn, have fun, and be a part of a fantastic community! 

Happy coding!

Continue ReadingTackle Advent of Code 2023 With Kotlin and Win Prizes!

Welcome Fleet with Kotlin Multiplatform Tooling

Kotlin Multiplatform (KMP) is an open-source technology built by JetBrains that allows you to share code across multiple platforms while retaining the benefits of native programming. Supported platforms include iOS, Android, desktop, web, and others.

Today, we’re launching a preview for Kotlin Multiplatform support in Fleet, which simplifies the development of multiplatform applications, adding to the already extensive Kotlin support in Fleet. Please note that if you’re targeting iOS and macOS, you will need Xcode.

Get Started

Let’s take a look at some of the features.

Simplicity

When you open a multiplatform project, Fleet will automatically create Run Configurations for the Android and/or iOS platforms, as declared in the project build file. You can use these to execute your application on an Android Virtual Device or the iOS Simulator.

Kotlin Multiplatform Tooling in Fleet: Auto-generated Run Configurations for Android and/or iOS

Polyglot Programming

Because Fleet is a polyglot IDE, you don’t have to switch to a different editor or compromise usability when working with the native code in your multiplatform project. When editing Swift code, you have the same rich functionality you would expect in Kotlin and Java, as well as full support for Xcode projects.

Kotlin Multiplatform Tooling in Fleet: Polyglot programming

Code navigation

Fleet supports cross-language navigation between Swift and Kotlin. For example, when you use the Show Usages action on a Kotlin function, any invocations from Swift code will feature in the results. If there is a single match, then the associated file is displayed.

Swift-Kotlin cross-language navigation

Refactoring

Refactoring in Fleet is also cross-language. In the example below, if we use Rename Refactoring on the MainViewController type, then the refactoring will apply across both Kotlin and Swift modules.

Swift-Kotlin cross-language refactoring

Debugging

Debugging in Fleet is also cross-language. You can set a breakpoint in Swift code, view values and the call stack in that environment, step into a Kotlin call, and then continue as required.

Swift-Kotlin cross-language refactoring

A single IDE

As you may be aware or have experienced, creating Kotlin Multiplatform applications has oftentimes involved needing to use multiple IDEs in combination. This is still the case when targeting mobile, as Android Studio and Xcode are required. However, our goal with Fleet is to provide a single IDE where you can develop applications without needing to switch tools (Xcode will still be required to be installed when targeting Apple devices, but will not be necessary for daily work).

Pricing model

During the Preview period, Fleet, including the Kotlin Multiplatform Tooling, will remain free. Once we release the tooling, we anticipate the pricing model will be in line with that of Fleet itself. We’ll provide more information closer to the release date.

Our commitment to IntelliJ IDEA and the IntelliJ Platform

Fleet uses the IntelliJ code-processing engine for Swift and all of our Kotlin support, and consequently, we will continue to provide support for Kotlin in IntelliJ IDEA and on the IntelliJ Platform (thus also Android Studio). In addition, we have an ever-increasing base of developers using Kotlin in IntelliJ IDEA, and we want to assure you that innovation and support will continue on this platform.

Having said that, the target audience for IntelliJ IDEA will primarily remain that of server-side developers targeting the JVM. While it will be possible to open, navigate, and build Kotlin Multiplatform projects in IntelliJ IDEA and Android Studio, other features such as platform-specific run configurations, Compose Multiplatform features, and many other things that facilitate multiplatform development will be supported in Fleet only.

How to get started

To get started with Kotlin Multiplatform development and try out all of the cool features we have been working on, you can install the latest version of Fleet via the JetBrains Toolbox App. We also have a brand new online Web Wizard for creating Kotlin Multiplatform projects.

Make sure you check out the Fleet for Kotlin Multiplatform Development tutorial for a step-by-step guide on creating your first application. You can also take a look at some of the KMP sample applications  we’ve prepared.

Get Started

We need your feedback

It’s still very early days for Kotlin Multiplatform Tooling in Fleet, and we would love to hear your feedback. Let us know what works, what doesn’t, what is missing, and what you just can’t do without. Leave us a comment on this blog post or use our issue tracker. You can also share any feedback you have on Kotlin Multiplatform, including the tooling, on the #fleet channel on the Kotlin Slack.

Thank you!

Continue ReadingWelcome Fleet with Kotlin Multiplatform Tooling

Compose Multiplatform 1.5.10 – The Perfect Time To Get Started

Compose Multiplatform is a declarative UI framework built by JetBrains that allows developers to share their applications’ UIs across different platforms. It enables you to reuse up to 100% of your codebase across Android, iOS, desktop, and web. The framework leverages the code-sharing capabilities of the core Kotlin Multiplatform technology, which just became Stable in Kotlin 1.9.20.

Get Started with Compose Multiplatform

This 1.5.10 release of Compose Multiplatform provides support for Kotlin 1.9.20, offers simplified onboarding, introduces a new portal for documentation, and provides the features listed below:

With these across-the-board improvements, it has never been easier to adopt Compose Multiplatform. Now is a great time for you to start using Compose Multiplatform for cross-platform development, and if you are an existing user, these improvements will make your work more effective than ever.

Easier to get started

If you want to dive into Compose Multiplatform and Kotlin Multiplatform, then we have some great news for you:

  • The Kotlin Multiplatform Web Wizard lets you easily create new projects in a few clicks. The project contains both shared logic and a Compose Multiplatform UI for multiple platforms.
  • New onboarding tutorials are available for Android, iOS, and desktop. These will bring you up to speed on the core concepts of Kotlin Multiplatform and Compose Multiplatform.
  • The Compose Multiplatform documentation has been integrated into the Kotlin Multiplatform Development portal, making it easier and simpler for you to find the information you need.

You can also register for our webinar about getting started with Compose Multiplatform, scheduled for November 28.

New Material 3 components in common code

All Compose Material 3 components are now available in common code. The ModalBottomSheet, ExposedDropdownMenuBox, SearchBar, and DockedSearchBar components were added in this release, which completes the set of components defined in the 1.1.2 version of Compose Material 3.

This is how it will appear on desktop:

New Components on Desktop

And this is how it will look on iOS and Android:

New Components on iOS
                            
New Components on Android

Enhanced TextFields on iOS

This release features multiple enhancements to TextFields on iOS. A new Fast Delete mode is available, handling of double and triple taps has been improved, scroll physics includes the ‘rubber band effect’, and a crossfade animation improves interoperability.

  • Starting with this release, when you hold down Backspace, a new Fast Delete mode activates after the first 21 characters. In this mode each deletion removes two words. This aligns with the default iOS behavior and is what users expect.

Fast Delete mode on iOS

  • Starting with this release, double and triple taps in a TextField are always handled consistently. Double-tapping will always select the current word, while triple-tapping always selects the entire text.

Double and Triple Taps on iOS

  • Compose Multiplatform 1.5.0 introduced support for native scroll physics. This release adds support for overscroll (the “rubber band effect”) within large text fields. Your Compose Multiplatform UI will now provide the bounciness that iOS users expect.

Rubber Band Effect on iOS

Crossfade animation for UIKit interoperability

When you target iOS, Compose Multiplatform allows you to embed composables within a UIKit component hierarchy. This enables you to combine your Kotlin UI components with existing Swift or Objective-C widgets.

Starting with this release, when embedding composables within a UIKit hierarchy, a crossfade animation is applied to the screen as the orientation transitions. This prevents components from temporarily appearing stretched.

Increased compilation speed

In Kotlin 1.9.20, compiler caching and Compose Multiplatform are compatible. So, starting from this release, compiler caching is automatically enabled for Compose Multiplatform applications that use the Kotlin 1.9.20 compiler. Compilation is much faster for all compilations after the initial one.

Caching remains disabled when you use Compose Multiplatform with an earlier version of the Kotlin compiler. Manually setting  kotlin.native.cacheKind to none causes the Gradle compiler plugin to produce an error, so please remove this if present.

Basic support for the K2 compiler

In this release, we introduce partial support for the K2 compiler in Compose Multiplatform. You can use the Compose Compiler and K2 in combination to build basic applications. Full support for K2 is scheduled for the next CMP release, so stay tuned.

Enhanced rendering performance on iOS

In this release, we’ve improved performance on iOS by eliminating any instances of redundant or overly eager processing. In addition, the commands to be run on the GPU for rendering are prepared in a separate thread.

These changes mean that Compose Multiplatform apps running on iOS will have fewer missed frames. Any stutters or lags caused by missed frames will be reduced or removed.

New documentation portal

The new Kotlin Multiplatform Development Portal features tutorials, a FAQ, brand new samples, and other helpful documentation. This means getting started with Compose Multiplatform is easier than ever!

Topics covered include:

Grouping Compose Multiplatform materials with other multiplatform documentation, on a dedicated portal, makes them easier to find and consume. While some documentation remains on the Compose Multiplatform GitHub, our aim is to transfer it to the new portal soon.

Get Started with Compose Multiplatform

Wrapping up

There has never been a better time to get started with Compose Multiplatform! You can use the Compose Material 3 widgets to build beautiful user interfaces that behave consistently on Android, iOS, desktop, and web. Using the Kotlin Multiplatform Web Wizard you can be up and running in minutes, with the new onboarding tutorials to guide you as you build your first Compose Multiplatform applications.

We hope you’ll find building applications with Compose Multiplatform a fun and rewarding experience. Please provide feedback on how you get on. We invite you to join the discussion on the Kotlin Slack in the #compose channel, where you can discuss general topics related to Compose Multiplatform and Jetpack Compose.

What else to read and watch

Continue ReadingCompose Multiplatform 1.5.10 – The Perfect Time To Get Started

Kotlin Multiplatform Is Stable and Production-Ready

In a highly anticipated move, Kotlin Multiplatform, an open-source technology built by JetBrains that allows developers to share code across platforms while retaining the benefits of native programming, has become Stable and is now 100% ready for use in production.

Read on to learn about the evolution of Kotlin Multiplatform (KMP), how it can streamline your development process, and what educational resources are available for you to get the most out of the technology.

Get Started

Share code on your terms, with confidence

Designed with a core focus on flexibility and adaptability, Kotlin Multiplatform (KMP) blurs the boundaries between cross-platform and native development. It allows developers to reuse as much code as they want, write native code if and as needed, and seamlessly integrate shared Kotlin code into any project.

Since the first release of KMP, its flexibility has attracted many prominent companies, such as Netflix, Philips, McDonald’s, 9GAG, and Baidu. Many teams have already been capitalizing on KMP’s ability to be gradually integrated, as well as its low adoption risk. Some of them share isolated critical parts of their existing Kotlin code to improve the stability of their apps. Others, aiming to reuse as much code as possible without compromising app quality, share all application logic across mobile, desktop, web, and TV while maintaining native UIs.

With KMP being widely used in production since its Alpha release, JetBrains has been able to gather extensive feedback and refine the technology to provide a better multiplatform development experience in the Stable version, including the following.

Strict compatibility guarantees

The core of the Kotlin Multiplatform technology consists of many parts, such as compiler support, language features, the libraries API, IDEs, build tooling, and more. All of these cover the most popular code-sharing use-cases and are stable in Kotlin 1.9.20. “Stable” means that we will evolve those parts following strict compatibility rules, so you can confidently use them in your code.

Going beyond the core, KMP also has some more advanced parts that we’re still continuing to work on. Expect/actual classes are an example of such functionality (not to be confused with expect/actual functions, which are fully stable in Kotlin 1.9.20). Such features are explicitly marked as non-stable, and Kotlin will inform you when you’re using them. Please pay attention to the experimentality warnings and the corresponding documentation to make an informed decision about using or not using such features in your projects.

Better build setup user experience

To simplify project setup and maintenance, we’ve introduced the default hierarchy template. This new feature of the Kotlin Gradle plugin automatically configures Kotlin Source Sets for popular scenarios and reduces the amount of boilerplate in typical build scripts.

To help you diagnose build misconfigurations and errors, KMP delivers a couple of improvements in Stable:

  • Approximately 50 diagnostics were added to the Kotlin Gradle plugin, helping to detect common build issues and providing quick tips on how to fix them.
  • Improved output for Gradle errors in Xcode makes build issues in native parts of your project more discoverable.

Build and runtime performance improvements

In addition to other stability and robustness improvements, we’re continuing to improve the performance of KMP:

Thanks to all of these advancements, Kotlin Multiplatform can be used without hesitation for sharing code in production across Android, iOS, desktop (JVM), server-Side (JVM), and web, even in the most conservative usage scenarios.

Get Started

Use the power of the growing Kotlin Multiplatform ecosystem

The evolution of Kotlin Multiplatform isn’t limited to the technology itself, but extends to its thriving ecosystem cultivated by thousands of Kotlin developers worldwide. Since Beta, the number of KMP libraries has multiplied, offering diverse tools for networking, data storage, arithmetics, analytics, and more, enabling swift and confident app development.

The Android team at Google is continuing to support KMP users by providing the experimental multiplatform versions of Jetpack libraries, and they’ve already made the Collections, DataStore, Annotations, and Paging libraries compatible with Kotlin Multiplatform.

The KMP ecosystem also offers a range of tools for the iOS developer experience, with SKIE by Touchlab standing out. It generates Swift code that provides a Swift-friendly API layer, which bridges important Kotlin types, and implements seamless Coroutines interoperability.

Get even more code-sharing freedom with Compose Multiplatform

Compose Multiplatform, a modern declarative cross-platform UI framework by JetBrains, is a significant part of the ever-expanding KMP ecosystem. With Compose Multiplatform, you now have full code-sharing flexibility. Share just one piece of logic, all application logic, or both the logic and the UI, depending on your project’s and team’s requirements:

Compose Multiplatform for Android and desktop (JVM) is already Stable, while support for iOS is currently in Alpha and support for web (Wasm) is Experimental.

Explore the future of Kotlin Multiplatform

JetBrains continues to enhance multiplatform development with Kotlin, aiming to make it the ultimate choice for sharing code across platforms:

  • Future updates for the core Kotlin Multiplatform technology will improve the iOS developer experience, including direct Kotlin-to-Swift interoperability and SwiftPM support.
  • The next milestone for Compose Multiplatform for iOS is Beta support in 2024.
  • JetBrains is actively developing Kotlin/Wasm to facilitate modern web development with KMP, aiming to deliver the Alpha version of Compose Multiplatform for Web (Wasm) next year.

And that’s not all. In the upcoming weeks, get ready for some thrilling announcements regarding the evolution of Kotlin Multiplatform tooling!

Get started with Kotlin Multiplatform

Begin your journey with our extensive, user-friendly educational resources.

Participate in our Kotlin Multiplatform Webinar November Series to get insights directly from JetBrains experts! Explore Kotlin Multiplatform features, build KMP apps with both native and shared UIs, and uncover iOS development tips and tricks:

Register

The new Kotlin Multiplatform Development Portal offers detailed documentation, getting-started guides, and step-by-step tutorials covering all aspects of building apps with Kotlin Multiplatform and Compose Multiplatform:

Get Started

Continue ReadingKotlin Multiplatform Is Stable and Production-Ready

End of content

No more pages to load