Gradle Kotlin DSL 1.0

Paul Merlin
This is a guest blog post from Paul Merlin
software engineer for Gradle

The recently released Gradle 5.0 includes the Gradle Kotlin DSL v1.0 which is now ready for widespread use.

We want you to enjoy a build authoring experience with the benefits provided by Kotlin’s static type system in Intellij IDEA and Android Studio: auto-completion, smart content assist, quick access to documentation, navigation to source and context-aware refactoring.

To view the video in Safari you may need to install the VLC Web Browser Plugin.

In case you missed it, you can watch Paul Merlin demonstrate these benefits in the Type-safe build logic with Gradle Kotlin DSL video from KotlinConf 2018.

If you prefer the flexibility and dynamic features of Groovy, that’s totally okay — the Groovy DSL will not be deprecated.

Using the Kotlin DSL today

You can get started quickly by following the Creating New Gradle Builds guide. You can also follow one of the other guides like Building Kotlin JVM Libraries or Building Java Applications.

The Gradle Kotlin DSL Primer user manual chapter is the best place to start learning more: it will cover all the basics and answer most of your questions.

If you are working with an existing build using the Gradle Groovy DSL you’ll be interested in the Migrating build logic from Groovy to Kotlin guide.

Several community plugins now have Gradle Kotlin DSL snippets in their documentation: Spring Boot, Docker, Detekt, Kotlinter, APT, Android JUnit 5, Android Check 2, Android Play Publisher and the list goes on.

Last but not least, the Gradle documentation contains build script excerpts that demonstrate both the Groovy DSL and the Kotlin DSL. This is the best place to find how to all things with each DSL; and it covers all Gradle features.

Again, a big thank you to all who helped make this a reality!

Feedback wanted

Community involvement has been instrumental to reach 1.0. It is also crucial going forward.

We want to know what you think works well or poorly in the Kotlin DSL. Feedback on the IDE experience, logging, and everything in between is welcome. Please discuss through the Kotlin DSL issue tracker or the #kotlin-dsl channel on Gradle Community Slack (which you can join using this link).

Posted in community, guestpost, Tools | Tagged | 8 Comments

KotlinConf 2018 Videos, Slides, and Photos are Out!

The KotlinConf 2018 videos and their accompanying slides are all now available on the schedule on the website. In addition to this, there are two playlists on the JetBrains TV channel which cover day one and day two. The pictures from the event have been uploaded too. Check out the picture gallery, and try and find yourself, your friends, and your colleagues, in some of the biggest highlights from the event!

20181004_hucopix_055 copy

Continue reading

Posted in Events | Tagged | Leave a comment

Kotlin 1.3 Webinars. Update: the recordings of the webinars are available

JetBrains is hosting two webinars on Kotlin 1.3 this December. Both events aim to explore the most common use cases and the challenges in adopting Coroutines, Kotlin/Native, and Multiplatform Projects.

Andrey Breslav will answer the questions you have on Kotlin 1.3 and our future plans during the Q&A session. To ask your questions, use #kotlinask_13 on Twitter or use YouTube chat during the webinar.

The recordings of the webinars are available on JetBrains TV: Kotlin Coroutines presentationby Roman Elizarov, Kotlin 1.3 Q&A with Andrey Breslav, and Kotlin Multiplatform projects (MPP), Kotlin/Native by Nikolay Igotti.

Kotlin_Webinars_1920x1080_08 (1)

Both events are free to attend and will be broadcast on the JetBrains TV YouTube channel. To get the link, please register for the webinar and we will notify you by email.

Continue reading

Posted in Events | Tagged , , | 12 Comments

Ktor 1.0 Released: A Connected Applications Framework by JetBrains

As we work on Kotlin, we implement many features that help build idiomatic and high-performing APIs. We’ve been dreaming of seeing a Web framework that utilizes these features to the max. Today, we can finally say we’ve built that kind of framework! Please welcome Ktor, which has just reached 1.0.

Ktor is a Kotlin framework for building asynchronous servers and clients in connected systems. It is being created by the Kotlin team, and as such, it takes full advantage of the language in order to provide a great developer experience and excellent runtime performance.

Ktor

Ktor is built from the ground up using coroutines, which make it possible to express complex asynchronous constructs as if they were simple sequential code. Coroutines are also quite efficient at runtime. In addition, the use of Kotlin features allows us to provide a domain-specific language (DSL) — a concise and developer-friendly API for configuring your application with no magic, just code.

Continue reading

Posted in JavaScript, Releases, Server | Tagged | 13 Comments

Kotlin 1.3 Released with Coroutines, Kotlin/Native Beta, and more

You can read this blog post in other languages:

Today we are releasing Kotlin 1.3 together with a set of accompanying libraries, build tools, and learning materials!

We develop Kotlin to be a good tool for all application developers, at all scales and on all platforms. In Kotlin 1.3 coroutines graduated to stable, making non-blocking code easy to read and write. Scalability has never been as approachable before! This release also brings Kotlin/Native Beta that compiles Kotlin code directly to native binaries. The multiplatform capabilities of Kotlin now cover all supported platforms so one can share business logic between such components as Android and iOS apps. Servers can share logic with web and mobile clients too, and multiplatform libraries make everyday tasks easily portable.

1_3_banner_dark

We’ll organize a series of webinars covering major features of 1.3. Subscribe here:

Continue reading

Posted in Android, Events, Native, Releases, Tools | Tagged | 30 Comments

KotlinConf 2018 Announcements

In today’s keynote at KotlinConf 2018 we made a series of announcements around releases, resources, and other things we’ve made available.

For your convenience below is a brief summary of the announcements with the corresponding links for more information.

Kotlin 1.3 hits RC

Version 1.3 hits RC and brings a ton of new features and functionality.

Coroutines

Kotlin Coroutines are no longer experimental. Check out the Overview page with more information on how to get started

Multiplatform Projects

Take advantage of Kotlin’s code sharing abilities across platforms with Multiplatform Projects.

Kotlin/Native is now in beta

After several years of development, Kotlin/Native hits beta. Learn everything about Kotlin/Native and how it can help you target different platforms.

New revamped playground

The online environment for trying out and learning Kotlin has a brand new look, new functionality, and an entire new section of “Kotlin by Example”.

Finally, whether you’re new to Kotlin or an existing user, check out the Learning Page for a list of resources available to you.

The Kotlin Foundation

JetBrains and Google have created the Kotlin Foundation that was announced last year at Google I/O.

How to try Kotlin 1.3 RC

In Maven/Gradle: Add https://dl.bintray.com/kotlin/kotlin-eap as a repository for the build script and your projects. Use 1.3.0-rc-146 as the version number for the compiler plugin and the standard library.

In IntelliJ IDEA: Go to Tools → Kotlin → Configure Kotlin Plugin Updates, select “Early Access Preview 1.3” in the Update channel drop-down list, and then click Check for updates.

The command-line compiler can be downloaded from the Github release page.

On play.kotlinlang.org: Kotlin 1.3‑RC compiler is switched on by default.

Check out the recent blog post on 1.3 RC for more information.

Let’s Kotlin!

Posted in Android, Events, iOS, Libraries, Native, Playground, Releases, Tools | Tagged | 8 Comments

Watch KotlinConf 2018 Live Now

We’re very excited to be able to live stream KotlinConf 2018. During the entire two days, we will be broadcasting an entire track. The keynote will kick off at 9 am CEST.

Thursday, October 4

Time Session
09:00-10:00 Keynote – Andrey Breslav
10:15-11:00 A Multiplatform Delight – Jake Wharton, Alec Strong
11:15-12:00 Type-safe build logic with Gradle Kotlin DSL – Paul Merlin
13:00-13:45 Safe(r) Kotlin Code – Static Analysis tools for Kotlin – Marvin Ramin
14:00-14:45 Annotation Processing in a Kotlin World – Zac Sweers
15:15-16:00 Exploring the Kotlin type hierarchy from top to bottom – Nat Pryce
16:15-17:00 Shaping your app’s architecture with Kotlin and Architecture Components – Florina Muntenescu
17:15-18:00 Representing State: the Kotlin Edition – Christina Lee

Friday, October 5

Time Session
09:00-10:00 I am a developer at 54 – Alicia Carr
10:15-11:00 Exploring Coroutines in Kotlin – Venkat Subramaniam
11:15-12:00 Functional Programming in Kotlin with Λrrow – Raúl Raja Martínez
13:00-13:45 Kotlin Coroutines in Practice – Roman Elizarov
14:00-14:45 10 tips to make libraries Kotlin-friendly – Kyle Thomson
15:15-16:00 Creating Internal DSLs in Kotlin – Venkat Subramaniam
16:15-17:00 Kotlin puzzlers, vol. 2 – Anton Keks
17:15-18:15 Closing Panel
Posted in Events | Tagged | 1 Comment

KotlinConf 2018 Live. Join the Conference Online

There are less than 10 days left until KotlinConf 2018. The event team has been working so hard over the whole of the last year to put together 2 days of sessions, and a full day of workshops for over 1200 attendees. Today there is one more exciting announcement to make for the event.

We are happy to welcome you to the KotlinConf 2018 Live event.


blogpost_916x506

Continue reading

Posted in community, Events | Tagged | 1 Comment

Kotlin 1.3 RC is Here: Migrate Your Coroutines!

We’re proud to introduce Kotlin 1.3-RC, the latest preview and release candidate for 1.3.0. This release mostly contains critical bug-fixes related to the new language features. Other notable changes and announcements include:

  • Ktor is wrapping up its API and looking forward to your feedback. Ktor is a framework for building web applications, HTTP services, mobile and browser applications. It’s elegant, asynchronous and built on coroutines.
  • The official code style is now used for all new projects. We also encourage you to migrate old projects to the official style.
  • The main entrypoint can now take no parameters and also can be a suspending function.
  • Experimental support for scripting introduced in version 1.2.50 has been reworked and improved.
  • An experimental kotlinx.serialization plugin has been merged to the main Kotlin project. Now it’s a bundled compiler plugin.
  • There are new deprecations in the standard library, as well as errors for some old deprecations.
  • Annotations in the org.jetbrains.annotations package were extracted from the standard library to separate artifacts.

RC

Continue reading

Posted in EAP, Releases | Tagged | 32 Comments

Kotlin 1.2.70 is Out!

We’re happy to announce the release of Kotlin 1.2.70, a new bugfix and tooling update for Kotlin 1.2. This release:

  • Significantly improves incremental compilation for Kotlin/JS
  • Marks a number of kotlin-stdlib-common annotations with @OptionalExpectation
  • Contains native binaries built with Excelsior JET for the standalone Kotlin compiler
  • Adds new refactorings, inspections, and intentions to the IntelliJ IDEA plugin
  • Fixes a lot of known issues in the compiler and the IDE plugin and provides performance improvements

The update is compatible with all versions of IntelliJ IDEA from 2017.3 to 2018.3, as well as with Android Studio 3.1, 3.2 RC, and 3.3 Canary.

Continue reading

Posted in Releases | Tagged | 23 Comments