├── .editorconfig
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
├── README.md
├── app
├── favicon.ico
├── index.html
└── src
│ ├── articles
│ └── articles.tsx
│ ├── banner
│ ├── banner.less
│ ├── banner.tsx
│ └── kotlin-conf.svg
│ ├── category
│ ├── category.less
│ └── category.tsx
│ ├── head
│ ├── head.less
│ ├── head.tsx
│ ├── kotlin-0.svg
│ ├── kotlin-1.svg
│ └── kotlin-2.png
│ ├── list
│ ├── list.less
│ └── list.tsx
│ ├── listitem
│ ├── listitem.less
│ ├── listitem.tsx
│ └── star.svg
│ ├── locations.tsx
│ ├── main.tsx
│ ├── page
│ ├── forkme_right_white_ffffff.png
│ ├── page.less
│ └── page.tsx
│ ├── root.tsx
│ ├── search
│ ├── search.less
│ ├── search.svg
│ └── search.tsx
│ ├── style.less
│ └── vars.less
├── articles
├── .links
│ ├── An adventure with Kotlin - Part I.kts
│ ├── Android: Improving sign-in experience with Google Sign-In and SmartLock.kts
│ ├── Classes in Kotlin: More power with less effort.kts
│ ├── Coding Functional Android Apps in Kotlin: Getting Started.kts
│ ├── Custom Views in Android with Kotlin.kts
│ ├── FoldingTabBar Comes to Android. Thank You, Google!.kts
│ ├── Implementing Android App Shortcuts.kts
│ ├── Java vs. Kotlin: Should You Be Using Kotlin for Android Development?.kts
│ ├── Kotlin VS Java: Basic Syntax Differences.kts
│ ├── Living (Android) without Kotlin.kts
│ ├── Seductive Code.kts
│ ├── Setting animation scale for Android UI tests.kts
│ └── Why You Must Try Kotlin For Android Development.kts
├── Draft
├── chinese
│ └── Redux for Android using Kotlin.kts
├── draft.md
├── english
│ ├── 2013
│ │ ├── Exploring the Kotlin Standard Library - Part 1.kts
│ │ ├── Exploring the Kotlin Standard Library - Part 2.kts
│ │ ├── Exploring the Kotlin Standard Library - Part 3.kts
│ │ ├── The Advent of Kotlin A Conversation with JetBrains' Andrey Breslav.kts
│ │ └── The Adventurous Developer’s Guide to JVM languages – Kotlin.kts
│ ├── 2014
│ │ ├── GeeCON Prague 2014 Andrey Cheptsov - A Reactive and Type-safe Kotlin DSL for NoSQL and SQL.kts
│ │ ├── Kotlin for Java developers.kts
│ │ ├── Kotlin vs Java puzzlers - Svetlana Isakova.kts
│ │ └── Non-trivial constructors in Kotlin.kts
│ ├── 2015
│ │ ├── Android + Kotlin = love.kts
│ │ ├── Building APIs on the JVM Using Kotlin and Spark – Part 1.kts
│ │ ├── Early Impressions of Kotlin.kts
│ │ ├── Exploring Kotlin.kts
│ │ ├── Exploring the Kotlin standard library.kts
│ │ ├── Functional Programming with Kotlin.kts
│ │ ├── JVMLS 2015 - Flexible Types in Kotlin.kts
│ │ ├── Kotlin New Hope in a Java 6 Wasteland.kts
│ │ ├── Kotlin NoSQL for MongoDB in Action.kts
│ │ ├── Kotlin for Java Developers 10 Features You Will Love About Kotlin.kts
│ │ ├── Kotlin love FP.kts
│ │ ├── Production Ready Kotlin.kts
│ │ ├── Quasar Efficient and Elegant Fibers, Channels and Actors.kts
│ │ ├── Quasar and Kotlin – a Powerful Match.kts
│ │ ├── RxAndroid and Kotlin (Part 1).kts
│ │ ├── Setting up Kotlin with Android and tests .kts
│ │ └── Why Kotlin is my next programming language.kts
│ ├── 2016
│ │ ├── 10 Features I Wish Java Would Steal From the Kotlin Language.kts
│ │ ├── 10 Kotlin Tricks in 10(ish) Minutes by Jake Wharton.kts
│ │ ├── 10 Kotlin Tutorials for Beginners Dive Into Kotlin Programming.kts
│ │ ├── 400 percent faster layouts with Anko.kts
│ │ ├── 5 small things you probably don’t know about Kotlin.kts
│ │ ├── A DSL Workbench with Gradle and Kotlin.kts
│ │ ├── A Developer’s Look at Kotlin.kts
│ │ ├── A Geospatial Messenger with Kotlin, Spring Boot and PostgreSQL.kts
│ │ ├── A Very Peculiar, but Possibly Cunning Kotlin Language Feature.kts
│ │ ├── A Whirlwind Tour of the Kotlin Type Hierarchy.kts
│ │ ├── A clean status bar with Android System UI and QuickDemo.kts
│ │ ├── A new hope for the JVM Kotlin.kts
│ │ ├── Ad-hoc polymorphism in Kotlin.kts
│ │ ├── Algebraic Data Types In Kotlin.kts
│ │ ├── An Introduction to Kotlin.kts
│ │ ├── An in-depth look at Kotlin’s initializers.kts
│ │ ├── Andrey Breslav Kotlin Coroutines, JVMLS 2016.kts
│ │ ├── Android And Kotlin.kts
│ │ ├── Android development with Kotlin.kts
│ │ ├── App State as a tree.kts
│ │ ├── Better Android Development with Kotlin and Gradle.kts
│ │ ├── Building DSL Instead of an IDE Plugin.kts
│ │ ├── Building a Kotlin project 1-2.kts
│ │ ├── Building a Kotlin project 2-2.kts
│ │ ├── Building a compiler for your own language validation.kts
│ │ ├── Building microservices with Kotlin and Spring Boot.kts
│ │ ├── Calling on EAPers.kts
│ │ ├── Christina Lee Kotlin in Production.kts
│ │ ├── Code Swarm for kotlin.kts
│ │ ├── Code improvements with Kotlin.kts
│ │ ├── Composing functions in Kotlin with extensions and operators.kts
│ │ ├── Concurrency Primitives in Kotlin.kts
│ │ ├── Crafting Log4j Configuration DSL.kts
│ │ ├── Creating an AndroidWear watchface using Kotlin.kts
│ │ ├── DSL builder in Kotlin.kts
│ │ ├── Data Binding in Anko.kts
│ │ ├── Data Driven Testing with Spek.kts
│ │ ├── Decision Trees with Kotlin.kts
│ │ ├── Developing Spring Boot applications with Kotlin.kts
│ │ ├── Developing a Geospatial Webservice with Kotlin and Spring Boot.kts
│ │ ├── Developing on Android sucks a lot less with Kotlin.kts
│ │ ├── Easy DSL design with Kotlin.kts
│ │ ├── Exercises in Kotlin Part 1 - Getting Started.kts
│ │ ├── Exercises in Kotlin Part 2 - High level syntax and Variables.kts
│ │ ├── Exercises in Kotlin Part 3 - Functions.kts
│ │ ├── Exercises in Kotlin Part 4 - Control flows and return.kts
│ │ ├── Exercises in Kotlin Part 5 - Classes.kts
│ │ ├── Experimental Kotlin and mutation testing.kts
│ │ ├── Experimenting with mutation testing and Kotlin.kts
│ │ ├── Exploring Delegation in Kotlin.kts
│ │ ├── Exploring an Either Monad in Kotlin.kts
│ │ ├── Extension Functions Can Be Utility Functions.kts
│ │ ├── Extension functions for more consistent APIs.kts
│ │ ├── FRP + Kotlin.kts
│ │ ├── Feedback on the Jospehus problem.kts
│ │ ├── Few thoughts about Kotlin and why I like it so much.kts
│ │ ├── First glimpse of Kotlin 1.1 Coroutines, Type aliases and more.kts
│ │ ├── From Groovy to Kotlin.kts
│ │ ├── Fun with Kotlin.kts
│ │ ├── Functional Programming in Kotlin with funKTionale (Video).kts
│ │ ├── Functional Programming in Kotlin with funKTionale.kts
│ │ ├── Functions as Data.kts
│ │ ├── Generating Kotlin Code for Better Refactorings, Tests, and IDE Support.kts
│ │ ├── Getting Started with Kotlin and Anko on Android.kts
│ │ ├── Getting started with Kotlin and third-party libraries Glide, Dagger 2, Retrofit 2, Realm, MVP and RxJava on Android.kts
│ │ ├── Getting started with Kotlin in Android development.kts
│ │ ├── Gradle Elevates the Build to First-Class Programming With Kotlin Language.kts
│ │ ├── Gradle Meets Kotlin.kts
│ │ ├── How to Hot Deploy Java-Kotlin classes in Dev.kts
│ │ ├── How to get IDEA to detect kotlin generated sources using Gradle.kts
│ │ ├── Improved Pattern Matching in Kotlin.kts
│ │ ├── Issues Faced With Kotlin During Android Development.kts
│ │ ├── JDK7-8 features in Kotlin 1.0.kts
│ │ ├── JMock and Kotlin.kts
│ │ ├── JUnit 5 with Spring Boot (plus Kotlin).kts
│ │ ├── JVM Newcomer Kotlin 1.0 is GA.kts
│ │ ├── Keddit - Part 7 Infinite Scroll Higher-Order functions and Lambdas.kts
│ │ ├── KillerTask, the solution to AsyncTask implementation.kts
│ │ ├── Konsent.kts
│ │ ├── Kotlin & Android A Brass Tacks Experiment Wrap-Up.kts
│ │ ├── Kotlin & Android A Brass Tacks Experiment, Part 1.kts
│ │ ├── Kotlin & Android A Brass Tacks Experiment, Part 2.kts
│ │ ├── Kotlin & Android A Brass Tacks Experiment, Part 3.kts
│ │ ├── Kotlin & Android A Brass Tacks Experiment, Part 4.kts
│ │ ├── Kotlin & Android A Brass Tacks Experiment, Part 5.kts
│ │ ├── Kotlin & Android A Brass Tacks Experiment, Part 6.kts
│ │ ├── Kotlin + Android First Impressions.kts
│ │ ├── Kotlin + Android.kts
│ │ ├── Kotlin + RxJava = Functional Powerhouse.kts
│ │ ├── Kotlin - 2 Years On.kts
│ │ ├── Kotlin - Love at first line.kts
│ │ ├── Kotlin - Ready for Production.kts
│ │ ├── Kotlin 1.0 Release Candidate is Out!.kts
│ │ ├── Kotlin 1.0 Released Pragmatic Language for JVM and Android.kts
│ │ ├── Kotlin 1.0 The good, the bad and the evident.kts
│ │ ├── Kotlin 1.0 is finally released!.kts
│ │ ├── Kotlin 1.0.1 is Here.kts
│ │ ├── Kotlin 1.0.2 is Here.kts
│ │ ├── Kotlin 1.0.3 EAP.kts
│ │ ├── Kotlin 1.0.3 Is Here!.kts
│ │ ├── Kotlin 1.0.4 is here.kts
│ │ ├── Kotlin 1.0.5 is here.kts
│ │ ├── Kotlin 1.0.6 is here!.kts
│ │ ├── Kotlin 1.1-M02 is here!.kts
│ │ ├── Kotlin 1.1-M03 is here!.kts
│ │ ├── Kotlin 1.1-M04 is here!.kts
│ │ ├── Kotlin Coding.kts
│ │ ├── Kotlin Configuration Scripts - An Introduction.kts
│ │ ├── Kotlin Digest 2016.Q1.kts
│ │ ├── Kotlin Easily storing a list in SharedPreferences with Custom Accessors.kts
│ │ ├── Kotlin Eclipse Plugin 0.7 Is Here!.kts
│ │ ├── Kotlin Educational Plugin.kts
│ │ ├── Kotlin How to Make Your Java Code Base Cleaner and More Readable.kts
│ │ ├── Kotlin How to Make a Java Developer's Life Easier.kts
│ │ ├── Kotlin Lang.kts
│ │ ├── Kotlin Meets Gradle.kts
│ │ ├── Kotlin Month Post 1 Assorted Features.kts
│ │ ├── Kotlin Month Post 2 Inheritance and Defaults.kts
│ │ ├── Kotlin Month Post 3 Safety.kts
│ │ ├── Kotlin Month Post 4 Properties.kts
│ │ ├── Kotlin Native.kts
│ │ ├── Kotlin NetBeans plugin beta is out!.kts
│ │ ├── Kotlin Night London - Nov 2016.kts
│ │ ├── Kotlin Night in San Francisco Recordings.kts
│ │ ├── Kotlin Post-1.0 Roadmap.kts
│ │ ├── Kotlin Practical Experience .kts
│ │ ├── Kotlin Retrofit + RxAndroid + Realm.kts
│ │ ├── Kotlin Ternary Operator.kts
│ │ ├── Kotlin The Good, The Bad, and The Ugly.kts
│ │ ├── Kotlin XML Binding.kts
│ │ ├── Kotlin a new JVM language you should try.kts
│ │ ├── Kotlin and Ceylon.kts
│ │ ├── Kotlin census call to action.kts
│ │ ├── Kotlin for Data Science.kts
│ │ ├── Kotlin for Scala Developers.kts
│ │ ├── Kotlin in Practice with Spring Boot and Vaadin.kts
│ │ ├── Kotlin in Production - What works, Whats broken.kts
│ │ ├── Kotlin in Real Projects.kts
│ │ ├── Kotlin is cheating on me.kts
│ │ ├── Kotlin null safety and its performance considerations -- part 1.kts
│ │ ├── Kotlin recipes for Android (I) OnGlobalLayoutListener.kts
│ │ ├── Kotlin val does not mean immutable, it just means readonly, yeah.kts
│ │ ├── Kotlin vs Java Compilation speed.kts
│ │ ├── Kotlin – The Next Language You Thought You Didn’t Need.kts
│ │ ├── Kotlin, dragging java into the modern world.kts
│ │ ├── Kotlin, rockin’ in production.kts
│ │ ├── Kotlin, the somewhat obscure modern Android-friendly programming language.kts
│ │ ├── KotlinLifeguard #1.kts
│ │ ├── Kotlin’s Android Roadmap.kts
│ │ ├── Kotlin’s killer features.kts
│ │ ├── Lessons from converting an app to 100% Kotlin.kts
│ │ ├── Link Kotlin DSL Anko.kts
│ │ ├── Logging in Kotlin & Android AnkoLogger vs kotlin-logging.kts
│ │ ├── Making Android Development Easier.kts
│ │ ├── Meet the Kotlin Team at Gradle Summit.kts
│ │ ├── Mimicking Kotlin Builders in Java and Python.kts
│ │ ├── Mocking Kotlin with Mockito.kts
│ │ ├── More Kotlin Extension Fun.kts
│ │ ├── More Kotlin Features to Love.kts
│ │ ├── More readable tests with Kotlin.kts
│ │ ├── My Kotlin Adventure.kts
│ │ ├── Natural testing with Kotlin.kts
│ │ ├── Neural Network in Kotlin.kts
│ │ ├── Neural Networks in Kotlin (part 2).kts
│ │ ├── Never say final mocking Kotlin classes in unit tests.kts
│ │ ├── News from KotlinTest.kts
│ │ ├── Non-volatile vs volatile captured refs by default.kts
│ │ ├── Our Experiment Building a Multiselection Solution for Android in Kotlin.kts
│ │ ├── PaperParcel with Kotlin.kts
│ │ ├── Performance comparison - building Android UI with code (Anko) vs XML Layout.kts
│ │ ├── Playing with Spring Boot, Vaadin and Kotlin.kts
│ │ ├── PultusORM Sqlite ORM for Kotlin.kts
│ │ ├── Quick dive in Kotlin extensions.kts
│ │ ├── Rest API plumbing with kotlin.kts
│ │ ├── Revisiting Types In Kotlin.kts
│ │ ├── Scala vs Kotlin Operator overloading.kts
│ │ ├── Scala vs Kotlin Pimp my library.kts
│ │ ├── Scala vs Kotlin inline and infix.kts
│ │ ├── Scala vs Kotlin.kts
│ │ ├── Solutions to multiple inheritance in Kotlin.kts
│ │ ├── Solving the Josephus problem in Kotlin.kts
│ │ ├── Some of my favorite Kotlin features (that we use a lot in Basecamp).kts
│ │ ├── Spring Boot and Kotlin, a match made in Heaven.kts
│ │ ├── Spring Tips the Kotlin Programming Language.kts
│ │ ├── Swift vs Kotlin for real iOS-Android apps.kts
│ │ ├── Taking Kotlin for a ride.kts
│ │ ├── Ten Kotlin Features To Boost Android Development.kts
│ │ ├── Testing in Kotlin.kts
│ │ ├── The Journey of a Spring Boot application from Java 8 to Kotlin The Application Class.kts
│ │ ├── The Journey of a Spring Boot application from Java 8 to Kotlin, part 2 Configuration Classes.kts
│ │ ├── The Journey of a Spring Boot application from Java 8 to Kotlin, part 3 Data Classes.kts
│ │ ├── The Kobalt diaries Automatic Android SDK management.kts
│ │ ├── The Kobalt diaries Parallel builds.kts
│ │ ├── The Kobalt diaries testing.kts
│ │ ├── The Reactive Scrabble benchmarks.kts
│ │ ├── The Road to Gradle Script Kotlin 1.0.kts
│ │ ├── The power of templating in a DSL.kts
│ │ ├── Things We've Learned During Coolcal Development in Kotlin.kts
│ │ ├── Thinking Functionally.kts
│ │ ├── Type safe JavaFX CSS with TornadoFX.kts
│ │ ├── UI Testing separating Assertions from Actions with Kotlin DSL.kts
│ │ ├── Ubuntu Make 16.03 Released With Eclipse JEE And IntelliJ IDEA EAP Support, More.kts
│ │ ├── Upgrade your workflow with 0-installation kotlin scriptlets.kts
│ │ ├── Using Kotlin For Tests in Android.kts
│ │ ├── Using Mockito for unit testing with Kotlin (1x).kts
│ │ ├── Using the Kotlin Language with Apache Spark.kts
│ │ ├── Weekend resources for new Kotlin programmers.kts
│ │ ├── What’s in store for Kotlin this year.kts
│ │ ├── When Kotlin met Gradle.kts
│ │ ├── Where We Stand & What's Next for Kotlin.kts
│ │ ├── Why I don't want to use Kotlin for Android Development yet.kts
│ │ ├── Why Kotlin is the next big thing for Java developers.kts
│ │ ├── Why You Must Try Kotlin For Android Development.kts
│ │ ├── Write a lightweight, cross-platform HTML5 desktop app with Kotlin.kts
│ │ ├── Writing Concise Code With Kotlin.kts
│ │ ├── Writing Gradle Build Scripts in Kotlin.kts
│ │ ├── Writing Kotlin Idiomatic Code.kts
│ │ ├── Writing a RESTful backend using Kotlin and Spring Boot.kts
│ │ ├── You can do Better with Kotlin.kts
│ │ └── Zero boilerplate delegation in Kotlin.kts
│ └── 2017
│ │ ├── Announcing KotlinConf.kts
│ │ ├── Announcing the Support Program for Kotlin User Groups and Events.kts
│ │ ├── Bytecode behind coroutines in Kotlin.kts
│ │ ├── Corda - Kotlin.kts
│ │ ├── Creating a self-contained Kotlin program using Avian.kts
│ │ ├── Experimental status of coroutines in 1.1 and related compatibility concerns.kts
│ │ ├── Future of Kotlin - How agile can language development be video.kts
│ │ ├── Future of Kotlin - How agile can language development be.kts
│ │ ├── Gradle Script Kotlin 0.8.0 Release Notes.kts
│ │ ├── How I built my first Kotlin-VertX-Hibernate stack.kts
│ │ ├── How we made Basecamp 3’s Android app 100% Kotlin.kts
│ │ ├── I wrote my website in Kotlin.kts
│ │ ├── Introducing Kotlin support in Spring Framework 5.0.kts
│ │ ├── Kanvas generating a simple IDE from your ANTLR grammar.kts
│ │ ├── Kotlin 1.0.7 is out.kts
│ │ ├── Kotlin 1.1 - What’s coming in the standard library.kts
│ │ ├── Kotlin 1.1 Beta 2 is here.kts
│ │ ├── Kotlin 1.1 Beta Is Here!.kts
│ │ ├── Kotlin 1.1 Event Report.kts
│ │ ├── Kotlin 1.1 Event in Your City.kts
│ │ ├── Kotlin 1.1 Event.kts
│ │ ├── Kotlin 1.1 Release Candidate is Here.kts
│ │ ├── Kotlin 1.1 Released with JavaScript Support, Coroutines and more.kts
│ │ ├── Kotlin 1.1 is also for Android Developers.kts
│ │ ├── Kotlin 1.1.1 is out.kts
│ │ ├── Kotlin 1.1.2 is out.kts
│ │ ├── Kotlin Native 0.2 Release.kts
│ │ ├── Kotlin Native Tech Preview - Kotlin without a VM.kts
│ │ ├── Kotlin-Native v0.2 is out.kts
│ │ ├── Leveraging TornadoFX to the fullest.kts
│ │ ├── Our first book about Kotlin is out.kts
│ │ ├── Reactor Kotlin Extensions 1.0.0.M1 released.kts
│ │ ├── The Design and Construction of Modern Build Tools.kts
│ │ ├── The Design and Construction of Modern Build Tools.png
│ │ ├── The Rise and Fall of JVM Languages.kts
│ │ ├── Use Kotlin with npm, webpack and react.kts
│ │ ├── Using Kotlin type-safe builders to create a DSL for Forms.kts
│ │ └── Why I prefer Kotlin.kts
├── hebrew
│ └── Taking Kotlin to production, Seriously.kts
├── italian
│ └── Costruiamo un treno in Kotlin.kts
├── migration.js
└── russian
│ ├── DevZen Podcast Kotlin и Vulkan 1.0 - Episode 0080.kts
│ ├── Kotlin - Будущие изменения и текущие мифы.kts
│ ├── Kotlin - Как сделать жизнь Java-разработчика легче.kts
│ ├── Kotlin 1.0. Задай вопрос команде.kts
│ ├── Kotlin без магии.kts
│ ├── Kotlin для начинающих.kts
│ ├── Podcast Разбор Полетов Episode 102 - Kotlin, тесты и здоровый сон.kts
│ ├── SDCast 41 в гостях Андрей Бреслав.kts
│ ├── Андрей Бреслав и Дмитрий Жемеров о Kotlin 1.0 на jug.msk.ru.kts
│ ├── Архитектор Kotlin Язык программирования - рабочий инструмент.kts
│ ├── Беглый взгляд на Async-Await в Android.kts
│ ├── Без слайдов интервью с Дмитрием Жемеровым из JetBrains.kts
│ ├── Видео со встречи JUG.ru с разработчиками Kotlin.kts
│ ├── Дмитрий Полищук - Kotlin + Android практический ликбез.kts
│ ├── Как себе выстрелить в ногу в Kotlin.kts
│ ├── Немного о Kotlin.kts
│ ├── Погружение в Async-Await в Android.kts
│ ├── Радио-Т 484.kts
│ └── Релиз Kotlin 1.0, языка программирования для JVM и Android.kts
├── awesome-kotlin.svg
├── build.gradle.kts
├── deploy.sh
├── deploy@morty.enc
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── links
├── Android.kts
├── JavaScript.kts
├── Libraries.kts
├── Links.kts
├── Native.kts
├── Projects.kts
└── UserGroups.kts
├── package.json
├── pages
├── github.css
├── highlight.pack.js
├── index.html
└── styles.css
├── robots.txt
├── settings.gradle
├── src
├── main
│ └── kotlin
│ │ └── link
│ │ └── kotlin
│ │ └── scripts
│ │ ├── Application.kt
│ │ ├── ApplicationConfiguration.kt
│ │ ├── Articles.kt
│ │ ├── Builder.kt
│ │ ├── Cache.kt
│ │ ├── CopyTask.kt
│ │ ├── DefaultStarsGenerator.kt
│ │ ├── GithubTrending.kt
│ │ ├── LanguageCodes.kt
│ │ ├── LinkChecker.kt
│ │ ├── LinkCheckerConfig.kt
│ │ ├── Model.kt
│ │ ├── OkHttpExtensions.kt
│ │ ├── PagesGenerator.kt
│ │ ├── ProjectLinks.kt
│ │ ├── Readability.kt
│ │ ├── ReadmeGenerator.kt
│ │ ├── RssGenerator.kt
│ │ ├── ScriptCompiler.kt
│ │ ├── Sitemap.kt
│ │ ├── SitemapGenerator.kt
│ │ ├── Utils.kt
│ │ └── model
│ │ └── Link.kt
└── test
│ └── kotlin
│ └── link
│ └── kotlin
│ └── scripts
│ ├── DefaultStarsGeneratorTest.kt
│ └── ReadmeGeneratorKtTest.kt
├── tsconfig.json
├── webpack.config.js
└── yarn.lock
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*]
2 | charset=utf-8
3 | end_of_line=lf
4 | insert_final_newline=true
5 | indent_style=space
6 | indent_size=4
7 |
8 | [*.kts]
9 | indent_style=space
10 | indent_size=2
11 |
12 | [build.gradle.kts]
13 | indent_style=space
14 | indent_size=4
15 |
16 | [*.{js,ts,tsx}]
17 | indent_style=space
18 | indent_size=2
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | npm-debug.log
3 | dist
4 | app/LinksWithStars.json
5 |
6 | # Kotlin/Gradle/Idea
7 | .idea
8 | .gradle
9 | build
10 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js: 7
3 | addons:
4 | ssh_known_hosts: kotlin.link
5 | apt:
6 | packages:
7 | - oracle-java8-installer
8 | - oracle-java8-set-default
9 | before_script:
10 | - npm test
11 | - openssl aes-256-cbc -K $encrypted_83630750896a_key -iv $encrypted_83630750896a_iv -in deploy@morty.enc -out ~/.ssh/deploy@morty -d
12 | - chmod 600 ~/.ssh/deploy@morty
13 | - eval "$(ssh-agent -s)"
14 | - ssh-add ~/.ssh/deploy@morty
15 | script:
16 | - source /etc/profile.d/jdk.sh
17 | - bash ./deploy.sh
18 | cache:
19 | yarn: true
20 | directories:
21 | - $HOME/.gradle/caches/
22 | - $HOME/.gradle/wrapper/
23 | before_cache:
24 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
25 | - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
26 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contribution Help
2 |
3 | ## Adding to this list
4 |
5 | This awesome list contains two views: standard github README page view, and nice website with search.
6 |
7 | **To contribute** to both places you need:
8 |
9 | Edit **[links/](./links/)file_name.kts** directly, and then run `./gradlew run`.
10 |
11 | *Happy contributing!*
12 |
13 | ## How to update webpage?
14 |
15 | Build on Travis CI automatically updates webpage on pushes to master.
16 |
--------------------------------------------------------------------------------
/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | If you want submit new link, please fill this:
2 |
3 | ```
4 | name = ""
5 | desc = ""
6 | href = ""
7 | tags = Tags[""]
8 | ```
9 |
10 | Example:
11 |
12 | ```
13 | name = "JetBrains/spek"
14 | desc = "A specification framework for Kotlin."
15 | href = "https://github.com/jetbrains/spek"
16 | tags = Tags["test", "assert", "bdd"]
17 | ```
18 |
--------------------------------------------------------------------------------
/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tibbi/awesome-kotlin/14ffb188025297d56d7ce9d1f287555e0913d7f1/app/favicon.ico
--------------------------------------------------------------------------------
/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
47 | )
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/listitem/star.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
--------------------------------------------------------------------------------
/app/src/locations.tsx:
--------------------------------------------------------------------------------
1 | export function searchString(object: QueryParams): string {
2 | return "?" + Object
3 | .keys(object)
4 | .filter(key => object[key] !== "")
5 | .map(key => `${key}=${encodeURIComponent(object[key])}`)
6 | .join("&");
7 | }
8 |
9 | interface QueryParams {
10 | [key: string]: string
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import * as ReactDOM from "react-dom";
3 | import {Root} from "./root";
4 | import "./style.less"
5 | import "css-loader!normalize.css"
6 |
7 | ReactDOM.render(
8 | ,
9 | document.getElementById("root")
10 | );
11 |
12 |
--------------------------------------------------------------------------------
/app/src/page/forkme_right_white_ffffff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tibbi/awesome-kotlin/14ffb188025297d56d7ce9d1f287555e0913d7f1/app/src/page/forkme_right_white_ffffff.png
--------------------------------------------------------------------------------
/app/src/page/page.less:
--------------------------------------------------------------------------------
1 | @import "../vars";
2 |
3 | .page {
4 | &_github_link {
5 | position: absolute;
6 | top: 0;
7 | right: 0;
8 | border: 0;
9 | @media screen and (max-width:@mb) {
10 | width: 110px;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/root.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import {Page} from "./page/page";
3 | import {Articles} from "./articles/articles";
4 | import {Router, Route, browserHistory} from "react-router"
5 |
6 | export function Root() {
7 | return (
8 |
9 |
10 |
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/search/search.less:
--------------------------------------------------------------------------------
1 | .search {
2 | @import "../vars";
3 |
4 | display: block;
5 | background:rgba(242, 242, 242, 0.7);
6 |
7 | * {
8 | box-sizing: border-box;
9 | }
10 |
11 | &_wrapper {
12 | display: block;
13 | max-width: 1024px;
14 | margin: auto;
15 | padding: 20px;
16 | }
17 |
18 | &_field {
19 | border: 2px solid #6D8DBA;
20 | display: block;
21 | width: 100%;
22 | background: #fff url('../search/search.svg') 98.8% 13px no-repeat;
23 | background-size: 26px 26px;
24 | padding: 10px 40px 10px 15px;
25 | outline-color: @accent;
26 | color: #3C4E67;
27 | font-size: 24px;
28 | font-family: 'Open Sans', sans-serif;
29 | font-weight: 300;
30 | &:focus {
31 | border-color: #F58A1F;
32 | }
33 | &::-webkit-input-placeholder {
34 | color: #C7D4E5;
35 | }
36 | }
37 | @media screen and (max-width:480px) {
38 | &_wrapper {
39 | padding: 20px 10px;
40 | }
41 |
42 | &_field {
43 | border-width: 1px;
44 | background-position: 98.8% 6px;
45 | background-size: 20px 20px;
46 | padding: 5px 32px 5px 10px;
47 | font-size: 16px;
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/app/src/search/search.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
51 |
--------------------------------------------------------------------------------
/app/src/search/search.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import * as ReactDOM from 'react-dom';
3 | import {withRouter} from "react-router";
4 | const styles = require('./search.less');
5 |
6 | class SearchComponent extends React.Component {
7 | constructor(props) {
8 | super(props);
9 | this.state = {value: ''};
10 | }
11 |
12 | handleChange = (event) => {
13 | this.setState({value: event.target.value});
14 | this.props.onChange(event.target.value);
15 | };
16 |
17 | handleKeyPress = (event) => {
18 | if (event.key === 'Enter') {
19 | event.preventDefault();
20 | return false;
21 | }
22 | };
23 |
24 | componentDidMount = () => {
25 | const query = this.props.location.query.q;
26 | if (query) {
27 | this.setState({value:query});
28 | this.props.onChange(query);
29 | }
30 | (ReactDOM.findDOMNode(this.refs['search']) as HTMLInputElement).focus();
31 | };
32 |
33 | render() {
34 | return
35 |
43 | ;
44 | }
45 | }
46 |
47 | interface SearchProps {
48 | onChange: (a: any) => void;
49 | location: any;
50 | }
51 |
52 | export const Search = withRouter(SearchComponent);
53 |
--------------------------------------------------------------------------------
/app/src/style.less:
--------------------------------------------------------------------------------
1 | body, html {
2 | font-family:"Open Sans", sans-serif;
3 | margin:0;
4 | padding:0;
5 | box-sizing:border-box;
6 | }
7 |
8 |
9 | body {
10 | background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACZJREFUeNpi/PTpEwMY8PLyMsFZnz9/ZoKzgAzG////Q1hAABBgAFeiDto+NxIZAAAAAElFTkSuQmCC") repeat;
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/vars.less:
--------------------------------------------------------------------------------
1 | @bg-light: #f0f1f5;
2 | @bg-light-blue: #eaeef4;
3 | @light-blue: #C7D4E5;
4 | @blue: #6D8DBA;
5 |
6 | @dark-blue: #3C4E67;
7 | @accent: #F58A1F;
8 | @accent-d: #F0610B;
9 | @gray: #AEB1B7;
10 |
11 | @tb: 1024px;
12 | @mb: 768px;
13 |
--------------------------------------------------------------------------------
/articles/.links/An adventure with Kotlin - Part I.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "An adventure with Kotlin - Part I",
14 | url = "http://angrybyte.me/post/154701023805/kotlin-adventures-1",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Milos Marinkovic",
22 | date = LocalDate.of(2016, 12, 20),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Android: Improving sign-in experience with Google Sign-In and SmartLock.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Android: Improving sign-in experience with Google Sign-In and SmartLock",
14 | url = "https://medium.com/@p.tournaris/android-improving-sign-in-experience-with-google-sign-in-and-smartlock-f0bfd789602a#.djgn5w44q",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Pavlos-Petros Tournaris",
22 | date = LocalDate.of(2016, 12, 14),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Classes in Kotlin: More power with less effort.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Classes in Kotlin: More power with less effort",
14 | url = "http://antonioleiva.com/classes-kotlin/",
15 | categories = listOf(
16 | "Kotlin"
17 | ),
18 | type = article,
19 | lang = EN,
20 | author = "Antonio Leiva",
21 | date = LocalDate.of(2016, 12, 7),
22 | body = body
23 | )
24 |
--------------------------------------------------------------------------------
/articles/.links/Coding Functional Android Apps in Kotlin: Getting Started.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Coding Functional Android Apps in Kotlin: Getting Started",
14 | url = "https://code.tutsplus.com/tutorials/start-developing-android-apps-with-kotlin-part-1--cms-27827",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Jessica Thornsby",
22 | date = LocalDate.of(2016, 12, 19),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Custom Views in Android with Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Custom Views in Android with Kotlin",
14 | url = "https://antonioleiva.com/custom-views-android-kotlin/",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Antonio Leiva",
22 | date = LocalDate.of(2016, 12, 27),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/FoldingTabBar Comes to Android. Thank You, Google!.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "FoldingTabBar Comes to Android. Thank You, Google!",
14 | url = "https://yalantis.com/blog/foldingtabbar-for-android/",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Andriy Hristyan",
22 | date = LocalDate.of(2016, 12, 15),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Implementing Android App Shortcuts.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Implementing Android App Shortcuts",
14 | url = "https://medium.com/@andreworobator/implementing-android-app-shortcuts-74feb524959b#.vrst29h9p",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Andrew Orobator",
22 | date = LocalDate.of(2016, 12, 19),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Java vs. Kotlin: Should You Be Using Kotlin for Android Development?.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Java vs. Kotlin: Should You Be Using Kotlin for Android Development?",
14 | url = "https://code.tutsplus.com/articles/java-vs-kotlin-should-you-be-using-kotlin-for-android-development--cms-27846",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Jessica Thornsby",
22 | date = LocalDate.of(2016, 12, 12),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Kotlin VS Java: Basic Syntax Differences.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Kotlin VS Java: Basic Syntax Differences",
14 | url = "https://yalantis.com/blog/kotlin-vs-java-syntax/",
15 | categories = listOf(
16 | "Kotlin",
17 | "Java"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Irina Galata",
22 | date = LocalDate.of(2016, 12, 13),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Living (Android) without Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Living (Android) without Kotlin",
14 | url = "https://hackernoon.com/living-android-without-kotlin-db7391a2b170#.kme29gfhg",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Piotr Ślesarew",
22 | date = LocalDate.of(2016, 12, 21),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Seductive Code.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Seductive Code",
14 | url = "https://publicobject.com/2016/12/19/seductive-code/",
15 | categories = listOf(
16 | "Kotlin",
17 | "Java"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Jesse Wilson",
22 | date = LocalDate.of(2016, 12, 19),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Setting animation scale for Android UI tests.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Setting animation scale for Android UI tests",
14 | url = "http://www.thedroidsonroids.com/blog/setting-animation-scale-for-android-ui-tests/",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Karol Wrótniak",
22 | date = LocalDate.of(2016, 12, 11),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/.links/Why You Must Try Kotlin For Android Development.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 | """
12 |
13 | Article(
14 | title = "Why You Must Try Kotlin For Android Development?",
15 | url = "https://medium.com/@amitshekhar/why-you-must-try-kotlin-for-android-development-e14d00c8084b#.2w8jdujf8",
16 | categories = listOf(
17 | "Kotlin"
18 | ),
19 | type = article,
20 | lang = EN,
21 | author = "Amit Shekhar",
22 | date = LocalDate.of(2016, 11, 10),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/chinese/Redux for Android using Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.ZH
4 | import link.kotlin.scripts.LinkType.video
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Redux for Android using Kotlin",
14 | url = "https://www.youtube.com/watch?v=BUAxqiGrKOc",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = video,
20 | lang = ZH,
21 | author = "Nevin Chen",
22 | date = LocalDate.of(2016, 11, 22),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/draft.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tibbi/awesome-kotlin/14ffb188025297d56d7ce9d1f287555e0913d7f1/articles/draft.md
--------------------------------------------------------------------------------
/articles/english/2014/GeeCON Prague 2014 Andrey Cheptsov - A Reactive and Type-safe Kotlin DSL for NoSQL and SQL.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | [GeeCON Prague 2014: Andrey Cheptsov - A Reactive and Type-safe Kotlin DSL for NoSQL and SQL](https://vimeo.com/110781020)
10 |
11 | """
12 |
13 | Article(
14 | title = "GeeCON Prague 2014: Andrey Cheptsov - A Reactive and Type-safe Kotlin DSL for NoSQL and SQL",
15 | url = "https://vimeo.com/110781020",
16 | categories = listOf(
17 | "Kotlin",
18 | "SQL"
19 | ),
20 | type = video,
21 | lang = EN,
22 | author = "Andrey Cheptsov",
23 | date = LocalDate.of(2014, 11, 3),
24 | body = body
25 | )
26 |
--------------------------------------------------------------------------------
/articles/english/2014/Kotlin for Java developers.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 | """
12 |
13 | Article(
14 | title = "Kotlin for Java developers",
15 | url = "https://www.youtube.com/watch?v=vmjfIRsawlg",
16 | categories = listOf(
17 | "Kotlin"
18 | ),
19 | type = video,
20 | lang = EN,
21 | author = "Hadi Hariri",
22 | date = LocalDate.of(2014, 12, 11),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/english/2014/Kotlin vs Java puzzlers - Svetlana Isakova.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | [Kotlin vs Java puzzlers - Svetlana Isakova](https://vimeo.com/105758307)
11 |
12 | """
13 |
14 | Article(
15 | title = "Kotlin vs Java puzzlers",
16 | url = "https://vimeo.com/105758307",
17 | categories = listOf(
18 | "Kotlin"
19 | ),
20 | type = video,
21 | lang = EN,
22 | author = "Svetlana Isakova",
23 | date = LocalDate.of(2014, 9, 10),
24 | body = body
25 | )
26 |
--------------------------------------------------------------------------------
/articles/english/2015/Functional Programming with Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes
4 | import link.kotlin.scripts.LinkType.webinar
5 | import java.time.LocalDate
6 |
7 | val body = """
8 | The recording of our October 22nd webinar, **Functional Programming with Kotlin**, is now available on [JetBrainsTV YouTube channel](https://youtu.be/AhA-Q7MOre0).
9 |
10 | In this talk, Mike Hearn provides a brief introduction to programming in Kotlin via practical example: creating a textfield with the autocomplete suggestions while typing. Demo project is available on [GitHub](https://github.com/mikehearn/KotlinFPWebinar).
11 |
12 | Topics covered include:
13 |
14 | * Use of functional transforms
15 | * Immutability
16 | * Lazyness and working with lazy infinite sequences
17 | * The use of [funKTionale](https://github.com/MarioAriasC/funKTionale), a library that extends Kotlin with a few features known from Haskell
18 | * Pattern matching
19 | * Reactive user interfaces
20 |
21 |
22 |
23 | The video includes the time stamps following the [agenda announced](http://blog.jetbrains.com/kotlin/2015/10/join-live-webinar-functional-programming-with-kotlin/):
24 | * `00:08` — Intoduction and demo application
25 | * `05:00` — `apply` function
26 | * `05:45` — Introduce NGram data class
27 | * `08:22` — Creating extension methods
28 | * `09:55` — Working with lazy infinite sequences
29 | * `10:35` — `map` function
30 | * `11:10` — `to` function and infix notation
31 | * `14:35` — Destructuring of data classes
32 | * `19:20` — `filter`, `let` and `all` functions
33 | * `23:00` — Debug lazy code
34 | * `24:20` — Add completions to UI
35 | * `25:18` — Load data in a functional way
36 | * `28:30` — Improve performance of the data loading
37 | * `33:20` — Improve the UI responsiveness in RX style
38 | * `40:05` — Using [Kovenant](https://github.com/mplatvoet/kovenant) library
39 | * `42:03` — Using [funKTionale](https://github.com/MarioAriasC/funKTionale) library
40 | * `44:10` — Currying
41 | * `45:35` — Questions
42 |
43 | About the Presenter:
44 |
45 |  [Mike Hearn](http://plan99.net/~mike/) is a Java, Kotlin and C++ developer who works on digital currency related software. Prior to that he was a senior software engineer at Google, where he spent over seven years working on a range of products including Earth, Maps, Gmail and the accounts system.
46 |
47 | Thanks to all the attendees for the questions! If you still have some, please, contact Mike or our team.
48 |
49 | You are welcome to suggest themes for future webinars in comments.
50 |
51 | _Let’s kotlin!_
52 | """
53 |
54 | Article(
55 | title = "Functional Programming with Kotlin",
56 | url = "http://blog.jetbrains.com/kotlin/2015/11/webinar-recording-functional-programming-with-kotlin/",
57 | categories = listOf(
58 | "Kotlin",
59 | "Webinar",
60 | "Fp",
61 | "Functional"
62 | ),
63 | type = webinar,
64 | lang = LanguageCodes.EN,
65 | author = "Roman Belov",
66 | date = LocalDate.of(2015, 11, 5),
67 | body = body
68 | )
--------------------------------------------------------------------------------
/articles/english/2015/JVMLS 2015 - Flexible Types in Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 |
12 | """
13 |
14 | Article(
15 | title = "JVMLS 2015 - Flexible Types in Kotlin",
16 | url = "https://www.youtube.com/watch?v=2IhT8HACc2E",
17 | categories = listOf(
18 | "Kotlin"
19 | ),
20 | type = video,
21 | lang = EN,
22 | author = "Andrey Breslav",
23 | date = LocalDate.of(2015, 8, 12),
24 | body = body
25 | )
26 |
--------------------------------------------------------------------------------
/articles/english/2015/Kotlin New Hope in a Java 6 Wasteland.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | [Slides](https://speakerdeck.com/pardom/kotlin-new-hope-in-a-java-6-wasteland)
11 |
12 | """
13 |
14 | Article(
15 | title = "Kotlin: New Hope in a Java 6 Wasteland",
16 | url = "https://speakerdeck.com/pardom/kotlin-new-hope-in-a-java-6-wasteland",
17 | categories = listOf(
18 | "Kotlin",
19 | "Android"
20 | ),
21 | type = slides,
22 | lang = EN,
23 | author = "Michael Pardo",
24 | date = LocalDate.of(2015, 5, 9),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/english/2015/Kotlin NoSQL for MongoDB in Action.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 |
12 | """
13 |
14 | Article(
15 | title = "Kotlin NoSQL for MongoDB in Action",
16 | url = "https://www.youtube.com/watch?v=80xgl3KThvM",
17 | categories = listOf(
18 | "Kotlin",
19 | "SQL"
20 | ),
21 | type = video,
22 | lang = EN,
23 | author = "Andrey Cheptsov",
24 | date = LocalDate.of(2015, 10, 22),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/english/2015/Quasar Efficient and Elegant Fibers, Channels and Actors.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | The recording of our September 16th webinar, **Quasar: Efficient and Elegant Fibers, Channels and Actors**, is now available on [JetBrainsTV YouTube channel](https://youtu.be/Nmob2MB2Qo8).
10 |
11 | In this webinar, Fabio Tudone shows how to use Quasar for creation of highly concurrent software. He covers basics of Kotlin syntax and shows how Quasar uses Kotlin strengths to offer concise and expressive API.
12 |
13 | Demo project is available on [GitHub](https://github.com/circlespainter/quasar-kotlin-jetbrains-webinar/releases).
14 |
15 | The video includes the time stamps following the [agenda announced](http://blog.jetbrains.com/kotlin/2015/09/join-live-webinar-quasar-and-kotlin/):
16 | * `00:55` – What are Quasar and Fibers?
17 | * `12:22` – What are Quasar Channels?
18 | * `15:50` – What are and why using Quasar Fibers?
19 | * `21:15` – From Async to efficient Fiber-Sync with Quasar
20 | * `27:13` – Quasar Actors and Selective Receive
21 | * `37:54` – Quasar Dataflow
22 | * `45:19` – Pulsar: Quasar’s idiomatic API for Clojure
23 | * `45:19` – Comsat: existing APIs on steroids with Quasar Fibers
24 | * `47:07` – Comsat Web Actors for HTTP, SSE and WebSockets
25 | * `49:58` – Capsule: deploy Quasar and any JVM applications
26 |
27 |
28 |
29 | About the Presenter:
30 |
31 | [Fabio Tudone](https://twitter.com/ftudone) works on Quasar, Pulsar and Comsat at Parallel Universe. He has been writing mostly JVM software during his entire career, and before joining [Parallel Universe](http://www.paralleluniverse.co/) he led the development of a cloud-based enterprise content governance platform. His interests include Dev and DevOps practices, scalability, concurrent and functional programming as well as runtime platforms at large.
32 |
33 | Thanks to all the attendees for the questions! If you still have some, please, contact Fabio or our team.
34 |
35 | You are welcome to suggest themes for future webinars in comments.
36 |
37 | _Let’s kotlin!_
38 |
39 | """
40 |
41 | Article(
42 | title = "Quasar: Efficient and Elegant Fibers, Channels and Actors",
43 | url = "http://blog.jetbrains.com/kotlin/2015/09/webinar-recording-quasar-efficient-and-elegant-fibers-channels-and-actors/",
44 | categories = listOf(
45 | "Kotlin",
46 | "Webinar",
47 | "Fibers",
48 | "Channels",
49 | "Actors"
50 | ),
51 | type = webinar,
52 | lang = EN,
53 | author = "Roman Belov",
54 | date = LocalDate.of(2015, 9, 21),
55 | body = body
56 | )
57 |
--------------------------------------------------------------------------------
/articles/english/2016/10 Kotlin Tricks in 10(ish) Minutes by Jake Wharton.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Kotlin is a new and popular language for Android development. Its major advantages and features are immediately appealing and quick to learn, but it also has a lot of small and thoughtful parts which are harder to discover. This talk will cover 10 of my favorites with real-world examples.
10 |
11 |
12 |
13 |
14 | [Slides](https://speakerdeck.com/jakewharton/10-kotlin-tricks-in-10ish-minutes-square-nyc-november-2016) [Post on Authors Site](http://jakewharton.com/10-kotlin-tricks-in-10ish-minutes/)
15 |
16 | """
17 |
18 | Article(
19 | title = "10 Kotlin Tricks in 10(ish) Minutes",
20 | url = "https://www.youtube.com/watch?v=YKzUbeUtTak",
21 | categories = listOf(
22 | "Kotlin"
23 | ),
24 | type = video,
25 | lang = EN,
26 | author = "Jake Wharton",
27 | date = LocalDate.of(2016, 11, 10),
28 | body = body
29 | )
30 |
--------------------------------------------------------------------------------
/articles/english/2016/Andrey Breslav Kotlin Coroutines, JVMLS 2016.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 |
12 | """
13 |
14 | Article(
15 | title = "Andrey Breslav: Kotlin Coroutines, JVMLS 2016",
16 | url = "https://www.youtube.com/watch?v=4W3ruTWUhpw",
17 | categories = listOf(
18 | "Kotlin",
19 | "Coroutines"
20 | ),
21 | type = video,
22 | lang = EN,
23 | author = "Andrey Breslav",
24 | date = LocalDate.of(2016, 8, 3),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/english/2016/Better Android Development with Kotlin and Gradle.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | # v1
11 |
12 | In this talk, Ty will walk you through setting up and using Kotlin with Gradle to streamline your workflow for Android development, both within the build tool phase and within the application itself. After a brief overview of Kotlin, we’ll dive into how it can be used with Gradle to accelerate Android Development with a consistent language.
13 |
14 | [Slides](https://speakerdeck.com/tysmith/better-android-development-with-kotlin-and-gradle-1)
15 |
16 |
17 |
18 | # v2
19 |
20 | In this talk, Ty will walk you through using Kotlin with Gradle and Android to streamline your workflow for app development, both within the build tool phase and within the application itself. After a brief overview of Kotlin language, he'll dive into how it can be used with Gradle to accelerate Android Development with a consistent language through the entire stack. He'll provide real world examples of using Kotlin in Gradle plugins, Gradle script, and Android apps.
21 |
22 |
23 |
24 | # v3
25 |
26 | Ty Smith, Uber
27 | In this talk, Ty will walk you through setting up and using Kotlin with Gradle to streamline your workflow for Android development, both within the build tool phase and within the application itself, so that you can use a consistent language through the entire Android stack. After a brief overview of Kotlin, we’ll dive into how it can be used with Gradle to accelerate Android Development with a consistent language. I'll walk through a real world example of building a Gradle plugin in and scripts in Groovy, then I'll convert those into Kotlin. An open source repo of the sample will be provided to follow along.
28 |
29 |
30 |
31 | """
32 |
33 | Article(
34 | title = "Better Android Development with Kotlin and Gradle",
35 | url = "https://www.youtube.com/watch?v=bVSeKexyzhs",
36 | categories = listOf(
37 | "Kotlin",
38 | "Android",
39 | "Gradle"
40 | ),
41 | type = video,
42 | lang = EN,
43 | author = "Ty Smith",
44 | date = LocalDate.of(2016, 10, 3),
45 | body = body
46 | )
47 |
--------------------------------------------------------------------------------
/articles/english/2016/Christina Lee Kotlin in Production.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | # v1
10 |
11 | While in New York for Droidcon NYC, Huyen hangs out with Christina Lee, Pinterest Android engineer and cross-country runner, to talk about bringing Kotlin into your production apps.
12 |
13 |
14 |
15 | # v2
16 |
17 | Christina Lee, Pinterest
18 | It is hard to argue that Kotlin is not an amazing language. What is easy to argue is that there are many unknowns about its performance in the wild and at scale, which makes it hard to make an informed decision about incorporating it into your app. Fortunately for you, we went there and have lived to tell the tale. After more than a year of maintaining a pure Kotlin app at Highlight, and more recently helping Pinterest ramp up Kotlin in Android, we've learned much about the ramifications of moving away from Java. Come learn from our mistakes and successes as we cover the highs, and lows, of using Kotlin in the wild!
19 |
20 |
21 |
22 | """
23 |
24 | Article(
25 | title = "Christina Lee: Kotlin in Production",
26 | url = "https://www.youtube.com/watch?v=xRDqDe4rxkM",
27 | categories = listOf(
28 | "Kotlin"
29 | ),
30 | type = video,
31 | lang = EN,
32 | author = "Android Dialogs",
33 | date = LocalDate.of(2016, 10, 18),
34 | body = body
35 | )
36 |
--------------------------------------------------------------------------------
/articles/english/2016/Code Swarm for kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 |
12 | code_swarm visualization for kotlin (https://github.com/JetBrains/kotlin). The Kotlin Programming Language
13 |
14 | This visualization was generated by following this tutorial:
15 | http://derwiki.tumblr.com/post/43181171352/creating-a-codeswarm-for-your-git-repository
16 |
17 | More information:
18 | http://vis.cs.ucdavis.edu/~ogawa/codeswarm/
19 | https://github.com/rictic/code_swarm
20 |
21 | Why make this visualization?
22 | - I'm studying how popular projects evolve
23 |
24 | """
25 |
26 | Article(
27 | title = "Code Swarm for Kotlin",
28 | url = "https://www.youtube.com/watch?v=UTN2_YXEzL4",
29 | categories = listOf(
30 | "Kotlin"
31 | ),
32 | type = video,
33 | lang = EN,
34 | author = "Landon Wilkins",
35 | date = LocalDate.of(2016, 11, 24),
36 | body = body
37 | )
38 |
--------------------------------------------------------------------------------
/articles/english/2016/Developing a Geospatial Webservice with Kotlin and Spring Boot.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Spring I/O 2016 - 19 -20 May Barcelona
10 |
11 | As described in this announcement I made on [Spring blog](https://spring.io/blog/2016/02/15/developing-spring-boot-applications-with-kotlin), it is now easy to create a Spring Boot application using Kotlin.
12 |
13 | Thanks to a sample Geospatial chat application, I will show how Spring Boot and Kotlin share the same pragmatic, innovative and optionated mindset to allow you to build simple but powerful projects.
14 |
15 | That talk will also provide an opportunity to show how to use a relational database with Spring Data but without JPA in order to use advanced PostgreSQL functionalities (like its powerful spatial database extender PostGIS or the native JSON support) while keeping a lightweight stack.
16 |
17 |
18 |
19 |
20 |
21 | Update Nov 25 2016: Also see new version of this talk at Spring One Platform
22 |
23 | [Developing a Geospatial Webservice with Kotlin and Spring Boot](https://www.infoq.com/presentations/geospatial-kotlin-boot)
24 |
25 | """
26 |
27 | Article(
28 | title = "Developing a Geospatial Webservice with Kotlin and Spring Boot",
29 | url = "https://www.youtube.com/watch?v=tTTEiQj4BHA",
30 | categories = listOf(
31 | "Kotlin",
32 | "Spring"
33 | ),
34 | type = video,
35 | lang = EN,
36 | author = "Sébastien Deleuze",
37 | date = LocalDate.of(2016, 11, 25),
38 | body = body
39 | )
40 |
--------------------------------------------------------------------------------
/articles/english/2016/FRP + Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | 
11 |
12 | [Slides](https://drive.google.com/file/d/0BxCm4NRlzb3PWjNNaG1KS0Utckk/view)
13 |
14 | """
15 |
16 | Article(
17 | title = "FRP + Kotlin",
18 | url = "https://drive.google.com/file/d/0BxCm4NRlzb3PWjNNaG1KS0Utckk/view",
19 | categories = listOf(
20 | "Kotlin",
21 | "FP"
22 | ),
23 | type = slides,
24 | lang = EN,
25 | author = "Giorgio Natili",
26 | date = LocalDate.of(2016, 11, 25),
27 | body = body
28 | )
29 |
--------------------------------------------------------------------------------
/articles/english/2016/Fun with Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | [Fun with Kotlin](https://vimeo.com/151846078)
11 |
12 | """
13 |
14 | Article(
15 | title = "Fun with Kotlin",
16 | url = "https://vimeo.com/151846078",
17 | categories = listOf(
18 | "Kotlin"
19 | ),
20 | type = video,
21 | lang = EN,
22 | author = "Eder Bastos",
23 | date = LocalDate.of(2016, 1, 14),
24 | body = body
25 | )
26 |
--------------------------------------------------------------------------------
/articles/english/2016/Functional Programming in Kotlin with funKTionale (Video).kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | [Slides](https://speakerdeck.com/marioariasc/functional-programming-in-kotlin-with-funktionale-2)
11 |
12 |
13 |
14 | """
15 |
16 | Article(
17 | title = "Functional Programming in Kotlin with funKTionale (Video)",
18 | url = "https://www.youtube.com/watch?v=klakgWp1KWg",
19 | categories = listOf(
20 | "Kotlin"
21 | ),
22 | type = video,
23 | lang = EN,
24 | author = "Mario Arias",
25 | date = LocalDate.of(2016, 12, 16),
26 | body = body
27 | )
28 |
--------------------------------------------------------------------------------
/articles/english/2016/Functional Programming in Kotlin with funKTionale.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | _v1_
11 |
12 | [Slides on SpeakerDeck](https://speakerdeck.com/marioariasc/functional-programming-in-kotlin-with-funktionale-1)
13 |
14 | _v2_
15 |
16 | [Slides on SpeakerDeck](https://speakerdeck.com/marioariasc/functional-programming-in-kotlin-with-funktionale-2)
17 |
18 | """
19 |
20 | Article(
21 | title = "Functional Programming in Kotlin with funKTionale",
22 | url = "https://speakerdeck.com/marioariasc/functional-programming-in-kotlin-with-funktionale-1",
23 | categories = listOf(
24 | "Kotlin",
25 | "Functional Programming"
26 | ),
27 | type = slides,
28 | lang = EN,
29 | author = "Mario Arias",
30 | date = LocalDate.of(2016, 9, 29),
31 | body = body
32 | )
33 |
--------------------------------------------------------------------------------
/articles/english/2016/Generating Kotlin Code for Better Refactorings, Tests, and IDE Support.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | [Slides on Google Slides](https://docs.google.com/presentation/d/1pgzNnA4R3LU4hPnx0KTvQ0NFj23rPyq-ROr8kOiaxlM/edit#slide=id.p)
10 |
11 | """
12 |
13 | Article(
14 | title = "Generating Kotlin Code for Better Refactorings, Tests, and IDE Support",
15 | url = "https://docs.google.com/presentation/d/1pgzNnA4R3LU4hPnx0KTvQ0NFj23rPyq-ROr8kOiaxlM/edit#slide=id.p",
16 | categories = listOf(
17 | "Kotlin"
18 | ),
19 | type = slides,
20 | lang = EN,
21 | author = "Eugene Petrenko",
22 | date = LocalDate.of(2016, 9, 20),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/english/2016/Gradle Meets Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Back at **JavaOne 2015**, during a lunch break we started chatting with **Hans Dockter, CEO of Gradle**. A couple of days after the conference, a few of us were at the Gradle offices talking about what would be the beginning of the collaboration between JetBrains and Gradle; to bring first-class tooling and support for a static language to Gradle.
10 |
11 | Today, at the [Kotlin Night in San Francisco](http://info.jetbrains.com/Kotlin-Night-2016.html), Hans Dockter demoed the first milestone of writing a Gradle build script using Kotlin.
12 |
13 |
14 |
15 | ```kotlin
16 | import org.gradle.api.plugins.*
17 | import org.gradle.api.tasks.wrapper.*
18 | import org.gradle.script.lang.kotlin.*
19 |
20 | apply()
21 |
22 | configure {
23 | mainClassName = "samples.HelloWorld"
24 | }
25 |
26 | repositories {
27 | jcenter()
28 | }
29 |
30 | dependencies {
31 | "testCompile"("junit:junit:4.12")
32 | }
33 | ```
34 |
35 | Gradle allows developers and build engineers to deal with complex build automation scripts. As complexity grows, having a language that is statically-typed can help detect potential misconfigurations at compile time, contributing in reducing runtime issues. Static typing also opens up the door to more sophisticated tooling. All this, combined with key characteristics of Kotlin that enable easy creation of DSL’s, can provide Gradle users benefits while maintaining the level of fluency they are accustomed to.
36 |
37 | For the past 6 months, we’ve been working closely with the Gradle team, in particular with Chris Beams and Rodrigo de Oliveira in bringing Kotlin to Gradle. It has been a tremendously rewarding experience because it has also helped us see use-case scenarios for making scripting in Kotlin a first-class citizen.
38 |
39 | We are very excited for what Gradle has in store and are happy to continue collaborating with them closely in bringing a great experience to Gradle users.
40 |
41 | For more information and how to get the bits to start playing with this, make sure you read the [blog post by the Gradle team](http://gradle.org/blog/kotlin-meets-gradle) for more details. In addition, if you are on the public [**Kotlin Slack**](https://kotlinlang.slack.com), there’s a newly created **#gradle** channel for discussions.
42 |
43 | """
44 |
45 | Article(
46 | title = "Gradle Meets Kotlin",
47 | url = "http://blog.jetbrains.com/kotlin/2016/05/gradle-meets-kotlin/",
48 | categories = listOf(
49 | "Kotlin",
50 | "Gradle"
51 | ),
52 | type = article,
53 | lang = EN,
54 | author = "Hadi Hariri",
55 | date = LocalDate.of(2016, 5, 18),
56 | body = body
57 | )
58 |
--------------------------------------------------------------------------------
/articles/english/2016/How to Hot Deploy Java-Kotlin classes in Dev.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | One thing the majority of JVM developers find annoying is having to constantly restart their container. Make a small change, restart Tomcat/Jetty, wait 30+ seconds for code to build / compile (or several minutes in the case of large monolithic projects), see results; repeat.
10 |
11 | Compared to Dart which auto-reloads your changes as soon as you hit save, this is very inefficient and kills productivity.
12 |
13 | There's a commercial solution available called [JRebel](http://zeroturnaround.com/software/jrebel/) that aims to solve this problem, I took it for a test drive for a couple of weeks and managed to cut down several hours rapidly increasing my productivity and leaving me with a lot less time to spend on Hashnode.
14 |
15 | 
16 |
17 | Even though JRebel was saving me a lot of time and pretty much worked out of the box, I just couldn't justify the price tag - at almost $500 a year, converted to Rands, that's about the price of one month's rental in South Africa for a small flat - a bit heavy; all the time I'm saving, I'm paying over to them. Don't get me wrong, I enjoyed using JRebel, but the price tag is just too much when there are other solutions available.
18 |
19 | There is an open-source alternative which works just as well for what I'm using it for - it's called [Spring Loaded](https://github.com/spring-projects/spring-loaded#readme). It probably won't cover everything that JRebel is doing, but I'm mostly busy in Spring, so it's perfect for my needs.
20 |
21 | Download the [jar](http://repo.spring.io/release/org/springframework/springloaded/1.2.5.RELEASE/springloaded-1.2.5.RELEASE.jar) file, throw it somewhere where you won't accidentally delete it, open your `~/.bash_profile` if you're using OSX or on Linux it would typically be your `~/.bashrc` and add the following line followed by restarting your terminal:
22 |
23 | `export MAVEN_OPTS="-javaagent:/absolute/path/Code/springloaded-1.2.5.RELEASE.jar -noverify"`
24 |
25 | Now when you run your application using the maven jetty plugin or maven tomcat plugin (`mvn jetty:run`), every time you compile a class, it will be reloaded for you without having to do `Ctrl + C` and restarting `mvn jetty:run`. In Eclipse this will happen automatically if you have auto build turned on, in IntellJ, just assign a shortcut to the compile command (I'm using `Cmd + S`), once you're done with your changes, simply hit `Cmd + S` and you can immediately see your changes without restarts.
26 |
27 | Happy coding!!
28 |
29 | """
30 |
31 | Article(
32 | title = "How to Hot Deploy Java/Kotlin classes in Dev",
33 | url = "https://hashnode.com/post/how-to-hot-deploy-javakotlin-classes-in-dev-cim3u5oen00fnek53ho7q1t0v",
34 | categories = listOf(
35 | "Deploy",
36 | "Kotlin"
37 | ),
38 | type = article,
39 | lang = EN,
40 | author = "Jan Vladimir Mostert",
41 | date = LocalDate.of(2016, 3, 22),
42 | body = body
43 | )
44 |
--------------------------------------------------------------------------------
/articles/english/2016/How to get IDEA to detect kotlin generated sources using Gradle.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | So I recently got my hands on Kotlin and it's been great so far.
10 |
11 | However one of the things that the IDEA kotlin plugin doesn't do[1](#fn:1) is detect the `kapt` folder which contains any sources generated from annotation processing. This can be fixed using the IDEA gradle plugin[2](#fn:2).
12 |
13 | The idea plugin isn't able to mark the kapt folder as a source directory unless it's been added to the gradle source set.
14 |
15 | ```gradle
16 | sourceSets.main.java.srcDir file("${"$"}buildDir/generated/source/kapt/")
17 |
18 | ```
19 |
20 | The next step is to tell the idea plugin to mark the kapt folder as a generated sources root in the module[3](#fn:3).
21 |
22 | ```gradle
23 | idea {
24 | module {
25 | // Tell idea to mark the folder as generated sources
26 | generatedSourceDirs += file("${"$"}buildDir/generated/source/kapt/")
27 | }
28 | }
29 | ```
30 |
31 | When put together your build script should look a little like this.
32 |
33 | ```gradle
34 | apply plugin: 'idea'
35 |
36 | ...
37 |
38 | kapt {
39 | generateStubs = true
40 | }
41 |
42 | // Add kapt directory to sources
43 | sourceSets.main.java.srcDir file("${"$"}buildDir/generated/source/kapt/")
44 |
45 | idea {
46 | module {
47 | // Tell idea to mark the folder as generated sources
48 | generatedSourceDirs += file("${"$"}buildDir/generated/source/kapt/")
49 | }
50 | }
51 | ```
52 |
53 | ###### Footnotes and references
54 |
55 | 1. →, V. (2015). Better Annotation Processing: Supporting Stubs in kapt. [online] Kotlin Blog. Available at: [https://blog.jetbrains.com/kotlin/2015/06/better-annotation-processing-supporting-stubs-in-kapt/#comment-36065](https://blog.jetbrains.com/kotlin/2015/06/better-annotation-processing-supporting-stubs-in-kapt/#comment-36065) [Accessed 25 Jun. 2016]. [↩](#fnref:1 "return to article")
56 |
57 | 2. Docs.gradle.org. (2016). The IDEA Plugin - Gradle User Guide Version 2.14. [online] Available at: [https://docs.gradle.org/current/userguide/idea_plugin.html](https://docs.gradle.org/current/userguide/idea_plugin.html) [Accessed 25 Jun. 2016]. [↩](#fnref:2 "return to article")
58 |
59 | 3. Docs.gradle.org. (2016). IdeaModule - Gradle DSL Version 2.14. [online] Available at: [https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html](https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.idea.model.IdeaModule.html) [Accessed 25 Jun. 2016]. [↩](#fnref:3 "return to article")
60 | """
61 |
62 | Article(
63 | title = "How to get IDEA to detect kotlin generated sources using Gradle",
64 | url = "https://blog.nishtahir.com/2016/06/25/how-to-get-idea-to-detect-kotlin-generated-sources-using-gradle/",
65 | categories = listOf(
66 | "Kotlin"
67 | ),
68 | type = article,
69 | lang = EN,
70 | author = "Nish Tahir",
71 | date = LocalDate.of(2016, 6, 25),
72 | body = body
73 | )
74 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin + Android.kts:
--------------------------------------------------------------------------------
1 | import link.kotlin.scripts.Article
2 | import link.kotlin.scripts.LinkType.slides
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import java.time.LocalDate.of
5 |
6 | val body = """
7 | [Slides](https://speakerdeck.com/dmytrodanylyk/kotlin-plus-android)
8 | """
9 |
10 | Article(
11 | title = "Kotlin + Android",
12 | url = "https://speakerdeck.com/dmytrodanylyk/kotlin-plus-android",
13 | categories = listOf(
14 | "Kotlin",
15 | "Android"
16 | ),
17 | type = slides,
18 | lang = EN,
19 | author = "Dmytro Danylyk",
20 | date = of(2016, 4, 21),
21 | body = body
22 | )
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin - Ready for Production.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 | Kotlin - Ready for Production : Hadi Hariri from JavaZone on Vimeo.
12 |
13 | [Transcript](https://realm.io/news/gotocph-hadi-hariri-kotlin-ready-for-production/)
14 |
15 | """
16 |
17 | Article(
18 | title = "Kotlin - Ready for Production",
19 | url = "https://vimeo.com/181814363",
20 | categories = listOf(
21 | "Kotlin"
22 | ),
23 | type = video,
24 | lang = EN,
25 | author = "Hadi Hariri",
26 | date = LocalDate.of(2016, 9, 7),
27 | body = body
28 | )
29 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin 1.0 is finally released!.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Last week, there was a wonderful announcement: (see title of post)! No more milestones, betas, or release candidates required! Obviously, release candidates for later versions will be coming out, but now you don’t have to worry about them if you don’t want to.
10 |
11 | If you’re like me and were waiting until release before trying to convince company management to consider Kotlin as a development option, now is the time to speak out!
12 |
13 | In celebration of Kotlin’s proper release, I will be doing a short series of articles describing some of my favorite things about the language. Starting this weekend with a quick overview of smaller features that I don’t have a ton to say about. I’m calling it Kotlin Month, and I only slightly regret that the first one will be in one month while the others are in the next month :P
14 |
15 | Also, you may notice that there’s now a page at the top pertaining to Kotlin articles. This won’t be much more useful than selecting the Kotlin tag from the tag cloud to the right, but it will at least stay there, even if Kotlin posts dwindle far enough to remove the tag from the cloud.
16 | """
17 |
18 | Article(
19 | title = "Kotlin 1.0 is finally released!",
20 | url = "https://programmingideaswithjake.wordpress.com/2016/02/22/kotlin-1-0-is-finally-released/",
21 | categories = listOf(
22 | "Kotlin"
23 | ),
24 | type = article,
25 | lang = EN,
26 | author = "Jacob Zimmerman",
27 | date = LocalDate.of(2016, 2, 23),
28 | body = body
29 | )
30 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin 1.0.1 is Here.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | It’s been a month since we released Kotlin 1.0, and while our user base roughly doubled during this time, we prepared the first bugfix update.
10 |
11 | Kotlin 1.0.1 starts a series of 1.0.X versions delivering safe bug fixes and performance improvements to the language (as well as other parts of the project), and new features to our tools and integrations. This time it’s only relatively small IDE features, but bigger things are on the horizon for 1.0.2 and later.
12 |
13 | ## Changes in 1.0.1
14 |
15 | Please find the full change log [here](https://github.com/JetBrains/kotlin/blob/1.0.1/Changelog.md). Some numbers and highlights:
16 |
17 |
18 | * it’s 47 fixes in the compiler, library and Gradle plugin improvements (performance),
19 | * Compatibility with Gradle 2.12,
20 | * IDE features:
21 | * Compatibility with IDEA 2016,
22 | * Kotlin Education Plugin (for IDEA 2016),
23 | * [KT-9752](https://youtrack.jetbrains.com/issue/KT-9752) More usable file chooser for “Move declaration to another file”,
24 | * [KT-9697](https://youtrack.jetbrains.com/issue/KT-9697) Move method to companion object and back,
25 | * and 39 assorted fixes in the IDE.
26 |
27 | We thank the participants of the EAP who tried the preview builds and reported feedback. Please join the [EAP](https://discuss.kotlinlang.org/t/kotlin-1-0-1-eap/1525) and let’s make Kotlin better together!
28 |
29 | """
30 |
31 | Article(
32 | title = "Kotlin 1.0.1 is Here!",
33 | url = "http://blog.jetbrains.com/kotlin/2016/03/kotlin-1-0-1-is-here/",
34 | categories = listOf(
35 | "Kotlin",
36 | "Release"
37 | ),
38 | type = article,
39 | lang = EN,
40 | author = "Andrey Breslav",
41 | date = LocalDate.of(2016, 3, 16),
42 | body = body
43 | )
44 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin 1.0.3 EAP.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | We're starting Kotlin `1.0.3` EAP.
10 |
11 | ### What's new
12 |
13 | 1.0.3 brings some minor changes to compiler and lots of improvements to IntelliJ plugin:
14 | - Improved completion, refactorings, Maven support, formatter and Spring support
15 | - Language injection support
16 | - New intentions, inspections and quickfixes
17 | - Lots of bugfixes
18 |
19 | See full [changelog](https://github.com/JetBrains/kotlin/blob/3731e170e459bf02b562464ca02ccb6812760ee2/ChangeLog.md)
20 |
21 | ### How to get EAP build
22 |
23 | To use this build from Gradle or Maven, add [https://dl.bintray.com/kotlin/kotlin-eap](https://dl.bintray.com/kotlin/kotlin-eap) to your repositories.
24 | To use the new version of the Kotlin plugin for IntelliJ IDEA, configure Early Access Preview channel in **Tools | Kotlin | Configure Kotlin Plugin Updates** and press "Check for updates now".
25 |
26 | Build number is `1.0.3-eap-30`
27 |
28 | Please do provide feedback and report any issues to our [issue tracker](https://youtrack.jetbrains.com/issues/KT#newissue) (please specify your plugin version and IDE version)
29 |
30 | """
31 |
32 | Article(
33 | title = "Kotlin 1.0.3 EAP",
34 | url = "https://discuss.kotlinlang.org/t/kotlin-1-0-3-eap/1729",
35 | categories = listOf(
36 | "Kotlin"
37 | ),
38 | type = article,
39 | lang = EN,
40 | author = "Pavel Talanov",
41 | date = LocalDate.of(2016, 6, 8),
42 | body = body
43 | )
44 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin Eclipse Plugin 0.7 Is Here!.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | We are happy to present a new release of our plugin for Eclipse IDE. Along with the support for Kotlin **1.0.2** compiler, this update brings very important features and improvements.
10 |
11 | The code formatting feature was rebuilt in this release. Instead of our first naive implementation we have mostly managed to port the advanced formatter from the Kotlin IntelliJ Idea plugin into Eclipse. This means that [a lot of fixes](https://youtrack.jetbrains.com/issues/KT?q=Formatter%20State:%20Fixed%20Subsystems:%20IDE) are already there and upcoming improvements will be picked up automatically!
12 |
13 | 
14 |
15 | New line auto-indent also benefitted from this code reuse and now shows far more predictable and smart behaviour.
16 |
17 | It was possible to add missing classes imports one-by-one with a quick-fix since 0.1.0 version, and now we’ve improved on that by introducing the _Organize Imports_ feature. It will clean unused imports, add missing imports for classes used in the file and resort them.
18 |
19 | 
20 |
21 | Our completion got several fixes in prioritizing variants and is now far more usable. Also not-imported classes are now suggested in completion popup at once and will be inserted together with the corresponding import.
22 |
23 | 
24 |
25 | Several quick-fixes about missing or illegal modifiers were added:
26 |
27 | * It’s now possible to add an open modifier to a declaration which is overridden or subclassed.
28 | 
29 | * It’s now easy to deal with the _“class must be declared abstract”_ compiler error.
30 | 
31 |
32 | * Invalid modifier removing is now also available from the quick-fix popup.
33 | 
34 |
35 | Please give it a try.
36 |
37 | [](http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=2257536 "Drag to your running Eclipse workspace to install Kotlin Plugin for Eclipse")
38 |
39 | If you run into any problems or encounter missing features, please don’t hesitate to leave your feedback here or file issues in YouTrack.
40 |
41 | """
42 |
43 | Article(
44 | title = "Kotlin Eclipse Plugin 0.7 Is Here!",
45 | url = "http://blog.jetbrains.com/kotlin/2016/06/kotlin-eclipse-plugin-0-7-is-here/",
46 | categories = listOf(
47 | "Kotlin",
48 | "Eclipse"
49 | ),
50 | type = article,
51 | lang = EN,
52 | author = "Nikolay Krasko",
53 | date = LocalDate.of(2016, 6, 3),
54 | body = body
55 | )
56 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin Educational Plugin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | We always said that Kotlin is really easy to learn. And it is! But it’s not only about the language: learning materials make a difference too. Today we are making another important step in this direction. We are happy to present Kotlin Educational Plugin.
11 |
12 | [https://youtu.be/0ponbfQhESY](https://youtu.be/0ponbfQhESY)
13 |
14 | Kotlin Edu is a plugin for IntelliJ IDEA 2016.1 which lets you take learning courses. A course contains a number of tasks, and every task has several placeholders which you need to fill in correctly to solve it.
15 |
16 | At the moment, there is only one course — the well-known Kotlin Koans, which has been available [online](http://try.kotlinlang.org/koans) for some time and gained considerable popularity among Kotlin learners. The offline versions of the Koans has pretty similar user experience but with all strengths of refactorings and intention actions available in IntelliJ IDEA!
17 |
18 | If you have any questions about Kotlin Koans, feel free to ask them in the **#koans** channel [in our Slack](http://blog.jetbrains.com/kotlin/2016/03/kotlin-educational-plugin/kotlinslackin.herokuapp.com).
19 |
20 | P.S. If you want to create your own course, contact us directly via [email](mailto:roman.belov@jetbrains.com).
21 |
22 | """
23 |
24 | Article(
25 | title = "Kotlin Educational Plugin",
26 | url = "http://blog.jetbrains.com/kotlin/2016/03/kotlin-educational-plugin/",
27 | categories = listOf(
28 | "Kotlin",
29 | "Education"
30 | ),
31 | type = article,
32 | lang = EN,
33 | author = "Roman Belov",
34 | date = LocalDate.of(2016, 3, 17),
35 | body = body
36 | )
37 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin Lang.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | [Slides](https://speakerdeck.com/developer/kotlin-lang)
11 |
12 | """
13 |
14 | Article(
15 | title = "Kotlin Lang",
16 | url = "https://speakerdeck.com/developer/kotlin-lang",
17 | categories = listOf(
18 | "Kotlin",
19 | "Android"
20 | ),
21 | type = slides,
22 | lang = EN,
23 | author = "Jemo Mgebrishvili",
24 | date = LocalDate.of(2016, 11, 20),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin Night London - Nov 2016.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | [Announce](https://blog.jetbrains.com/kotlin/2016/09/kotlin-night-in-london/) | [Post in Kotlin Blog](https://blog.jetbrains.com/kotlin/2016/11/kotlin-night-in-london-recordings/)
10 |
11 |
12 |
13 | """
14 |
15 | Article(
16 | title = "Kotlin Night London",
17 | url = "https://www.youtube.com/watch?list=PLoo7Ank5cc7FaemZS4sZC0oFnSbdJ-PiH&v=TMZD1GxAC8E",
18 | categories = listOf(
19 | "Kotlin"
20 | ),
21 | type = video,
22 | lang = EN,
23 | author = "JetBrains",
24 | date = LocalDate.of(2016, 11, 15),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin Ternary Operator.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | ## Motivation
10 |
11 | Kotlin is very expressive language, but like Scala it lacks of ternary operator. Currently language provided alternative `if` looks a bit verbose.
12 |
13 | ```kotlin
14 | val result = if (myExpression) 1 else 2
15 | ```
16 | Compared to a classical Java or C++ variant
17 |
18 | ```java
19 | int result = myExpression ? 1 : 2
20 | ```
21 |
22 | Unlike Scala, Kotlin allows only fixed names for operators, so we cant fully reproduce classic syntax, but we can have something similar
23 |
24 | ```kotlin
25 | val result = myExpression % 1 / 2
26 |
27 | ```
28 |
29 | If you want to use complex boolean expression, you can wrap it in braces
30 |
31 | ```kotlin
32 | val result = (a == null && b > 5) % 1 / 2
33 | ```
34 |
35 | The impact I see here is temporary object creation, probably `inline` can't help.
36 |
37 | ```kotlin
38 | class Ternary(val expr: Boolean, val then: T) {
39 | public fun div(elze: T): T = if (expr) then else elze
40 | }
41 |
42 | public fun Boolean.mod(a: T): Ternary = Ternary(this, a)
43 | ```
44 |
45 | """
46 |
47 | Article(
48 | title = "Kotlin ternary operator",
49 | url = "https://gist.github.com/naixx/9d94c1498c4d45ffda3a",
50 | categories = listOf(
51 | "Kotlin"
52 | ),
53 | type = article,
54 | lang = EN,
55 | author = "naixx",
56 | date = LocalDate.of(2016, 11, 30),
57 | body = body
58 | )
59 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin census call to action.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Many times we’re asked by people working with or planning to work with Kotlin, what our adoption rate is and who’s using Kotlin and what for.
10 |
11 | While we do accept [pull requests](https://github.com/JetBrains/kotlin-web-site/blob/master/_data/companies-using-kotlin.yml) and run into an occasional _tweet_ we would really like to know first-hand from you, whether you’re using Kotlin in production and if so, how, and what issues you have faced. This not only helps us answer the question when someone asks about our adoption, but learn more about our community. With close to 4000 people on our [Kotlin Slack](http://kotlinslackin.herokuapp.com/) alone, it’s hard to keep track of every piece of feedback!
12 |
13 | As such, we’re asking you if you could kindly give us two minutes of your time and fill out the following survey. Please note that by providing us your details, you are not automatically giving us consent to use your name, application or company name. We would ask for written confirmation from you before doing so.
14 |
15 | Thank you!
16 |
17 | ### [Fill Out Survey](https://blog.jetbrains.com/kotlin/2016/09/kotlin-census-call-to-action/)
18 |
19 | """
20 |
21 | Article(
22 | title = "Kotlin census: call to action",
23 | url = "https://blog.jetbrains.com/kotlin/2016/09/kotlin-census-call-to-action/",
24 | categories = listOf(
25 | "Kotlin"
26 | ),
27 | type = article,
28 | lang = EN,
29 | author = "Roman Belov",
30 | date = LocalDate.of(2016, 9, 1),
31 | body = body
32 | )
33 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin in Real Projects.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.video
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 |
12 |
13 | """
14 |
15 | Article(
16 | title = "Kotlin in Real Projects",
17 | url = "https://www.youtube.com/watch?v=lpPbCWpBM3I",
18 | categories = listOf(
19 | "Kotlin"
20 | ),
21 | type = video,
22 | lang = EN,
23 | author = "Anton Keks",
24 | date = LocalDate.of(2016, 11, 1),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/english/2016/Kotlin val does not mean immutable, it just means readonly, yeah.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Hey hey, dear reader!
10 |
11 | I'm [seeing how people](https://www.toptal.com/android/kotlin-boost-android-development) (including myself some time ago) tend to think that `val` in Kotlin means **immutable**. Unfortunately, this is not true 😞
12 |
13 | Obviously, `val` can not guarantee that underlying object is **immutable**, that's clear.
14 |
15 | > But can we say that `val` guarantees that underlying **reference** to the object is **immutable**?
16 |
17 | No...
18 |
19 | Kotlin allows you declare `get()` of the `val` which breaks immutability of the property and leaves only `read` permission for external "users".
20 |
21 | Example:
22 |
23 | ```kotlin
24 | class OhNo {
25 |
26 | val yeah: Int
27 | get() = Random().nextInt()
28 |
29 | }
30 |
31 | ```
32 |
33 | Things are especially sad when you declare `val` in an `interface`:
34 |
35 | ```kotlin
36 | interface SomeService {
37 | val user: User
38 | }
39 | ```
40 |
41 | **Until you check implementation** (which is not always possible) you can't be sure that value will be same each time you read it from the property.
42 |
43 | Real world example is `List.size` from Kotlin stdlib.
44 |
45 | #### How to live with that?
46 |
47 | We have a **convention** (hopefully haha, at least I point to that in code reviews) internally in our team (100% Kotlin) to not declare properties like `val currentSomething: Something`, if value can be different each time you read it — please declare a function: `fun currentSomething()` or just `fun something()` because when it's a function then it's clear that resulting value can be different on each call. But for types that clearly represent "volatility" themselves, like `rx.Observable` it's ok to have them as `val`.
48 |
49 | Good thing is that in `data class` you can't define `get()` for properties declared in the constructor, but you can do it for non-constructor properties.
50 |
51 | > We've discussed that with [@abreslav](https://twitter.com/abreslav) and [@volebamor](https://twitter.com/volebamor) from Kotlin team, but looks like there is nothing Kotlin team can do about this at the moment. Would be great to have clear separation of immutable `val` and `readonly val`, but that's just dreams. Though I've opened an [issue](https://youtrack.jetbrains.com/issue/KT-13578) for highlighting that `val` has overriden `get()` in IDE.
52 |
53 | Stay immutable!
54 |
55 | """
56 |
57 | Article(
58 | title = "Kotlin: val does not mean immutable, it just means readonly, yeah",
59 | url = "https://artemzin.com/blog/kotlin-val-does-not-mean-immutable-it-just-means-readonly-yeah/",
60 | categories = listOf(
61 | "Kotlin"
62 | ),
63 | type = article,
64 | lang = EN,
65 | author = "Artem Zinnatullin",
66 | date = LocalDate.of(2016, 8, 30),
67 | body = body
68 | )
69 |
--------------------------------------------------------------------------------
/articles/english/2016/KotlinLifeguard #1.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Using [@JvmOverloads](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-overloads/) tag helps to avoid multiple constructors with Kotlin
10 |
11 | ## The headache
12 |
13 | It’s really possible that you had some code like:
14 |
15 | ```kotlin
16 | class MyCustomView : FrameLayout {
17 |
18 | constructor(context: Context) : super(context) {
19 | init()
20 | }
21 |
22 | constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
23 | init()
24 | }
25 |
26 | constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int)
27 | : super(context, attrs, defStyleAttr) {
28 | init()
29 | }
30 |
31 | fun init() {
32 | // ...
33 | }
34 | }
35 | ```
36 |
37 | As you can see there are all the constructors needed for a _custom_ `FrameLayout` but all with same “body”.
38 |
39 | 
40 |
41 | # The remedy
42 |
43 | Refactored with `@JvmOverloads`:
44 |
45 | ```kotlin
46 | class MyCustomView @JvmOverloads constructor(
47 | context: Context,
48 | attrs: AttributeSet? = null,
49 | defStyleAttr: Int = 0)
50 | : FrameLayout(context, attrs, defStyleAttr){
51 |
52 | init {
53 | // ...
54 | }
55 | }
56 | ```
57 |
58 | ## Thanks to
59 |
60 | * [Kotlin discuss](https://discuss.kotlinlang.org/t/simple-constructors-for-inheritance/1874/2)
61 | """
62 |
63 | Article(
64 | title = "KotlinLifeguard #1",
65 | url = "http://blog.makingiants.com/kotlin-lifeguard-1/",
66 | categories = listOf(
67 | "Android",
68 | "Kotlin"
69 | ),
70 | type = article,
71 | lang = EN,
72 | author = "Daniel Gomez Rico",
73 | date = LocalDate.of(2016, 7, 28),
74 | body = body
75 | )
76 |
--------------------------------------------------------------------------------
/articles/english/2016/Link Kotlin DSL Anko.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | [Kotlin DSL: Anko](https://docs.google.com/presentation/d/12mkyGQZO22kf0_6kp2K6xyFdpg0nBLqGtNcVR-cV4M8/pub)
11 |
12 | """
13 |
14 | Article(
15 | title = "Kotlin DSL: Anko",
16 | url = "https://docs.google.com/presentation/d/12mkyGQZO22kf0_6kp2K6xyFdpg0nBLqGtNcVR-cV4M8/pub",
17 | categories = listOf(
18 | "Kotlin",
19 | "Android"
20 | ),
21 | type = slides,
22 | lang = EN,
23 | author = "@maciekjanusz",
24 | date = LocalDate.of(2016, 4, 6),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/english/2016/Meet the Kotlin Team at Gradle Summit.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | You’ve probably heard the news announcing that you’ll soon be able to [write your Gradle build scripts and plugins in Kotlin](https://blog.jetbrains.com/kotlin/2016/05/gradle-meets-kotlin/). At the Kotlin Night in San Francisco, Hans Dockter from Gradle demoed the first prototype of the support. After the initial announcement, we’ve continued our work together with the Gradle team to flesh out the prototype and bring it closer to the release. And next week, at the [Gradle Summit in Palo Alto](https://gradlesummit.com/), we’ll be sharing the details on our progress.
10 |
11 | In addition to presentations by Gradle developers and users, you’ll see [the keynote by Dmitry Jemerov from the Kotlin team](https://gradlesummit.com/schedule/kotlin), talking about the DSL support features of Kotlin and their use in the Gradle build script DSL. And in the expo area, you’ll be able to chat with developers working on Kotlin, IntelliJ IDEA and TeamCity, who will help you with any questions related to the use of Gradle together with JetBrains products.
12 |
13 | The summit will be on June 23-24th in Palo Alto, California, and [the registration is open](https://info.gradlesummit.com/conference/palo_alto/2016/06/register). Looking forward to seeing you there!
14 |
15 | """
16 |
17 | Article(
18 | title = "Meet the Kotlin Team at Gradle Summit",
19 | url = "https://blog.jetbrains.com/kotlin/2016/06/meet-the-kotlin-team-at-gradle-summit/",
20 | categories = listOf(
21 | "Kotlin",
22 | "Gradle"
23 | ),
24 | type = article,
25 | lang = EN,
26 | author = "Dmitry Jemerov",
27 | date = LocalDate.of(2016, 6, 13),
28 | body = body
29 | )
30 |
--------------------------------------------------------------------------------
/articles/english/2016/Mocking Kotlin with Mockito.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | ## The un-mockable
10 |
11 | Given that by default Kotlin classes and functions are final (i.e, you need the `open` modifier to be able to inherit from them), when trying to mock behaviour in tests, you’re often left with no choice other than to declare these `open` or introduce interfaces solely for the purpose of testing. Neither of these are really great.
12 |
13 | For instance, given the following code
14 |
15 | ```kotlin
16 | class LoanCalculator {
17 | fun calculateAmount(customerId: Int): Double {
18 | return 100.0 * customerId
19 | }
20 | }
21 |
22 | ```
23 |
24 | and a class that uses the above
25 |
26 | ```kotlin
27 | class LoanService(val loanCalculator: LoanCalculator) {
28 | fun authoriseCustomerLoan(customerId: Int): Double {
29 | if (customerId != 0) {
30 | return loanCalculator.calculateAmount(customerId)
31 | }
32 | return 0.0
33 | }
34 | }
35 |
36 | ```
37 |
38 | If I want to be able to mock the `calculateAmount` function, I could write something like the following
39 |
40 | ```kotlin
41 | @Test
42 | fun authoriseCustomerLoan() {
43 | val mockLoanCalculator = mock(LoanCalculator::class.java)
44 | `when`(mockLoanCalculator.calculateAmount(3)).thenReturn(300.0)
45 | val loanService = LoanService(LoanCalculator())
46 | val amount = loanService.authoriseCustomerLoan(3)
47 | assertEquals(300.0, amount)
48 |
49 | }
50 | ```
51 |
52 | but on running it, Mockito would complain indicating that it cannot mock a class/method that is final.
53 |
54 | ## MockMaker
55 |
56 | [Mockito 2](http://mockito.org/) solves this. With the recent [release of version 2](https://github.com/mockito/mockito/wiki/What's-new-in-Mockito-2), one of the big changes is the ability to mock the un-mockable. In other words, you can mock final classes in Java and consequently all classes and member functions in Kotlin.
57 |
58 | In order to take advantage of this feature, you write your code in exactly the same way you would for mocking an open class/function. However, you need to perform an additional step which basically consists in creating a file named `org.mockito.plugins.MockMaker` and placing this under the `resources/mockito-extensions` directory in your test folder[1].
59 |
60 | The file contains a single line:
61 |
62 | ```
63 | mock-maker-inline
64 | ```
65 |
66 | 
67 |
68 | If you’re using Gradle, you can also have it [generate the file for you.](https://github.com/hhariri/mockito-sample/blob/master/build.gradle#L16). You can download the [sample project I’ve created from GitHub](https://github.com/hhariri/mockito-sample/)
69 |
70 | Finally, a big kudos to [Rafael](https://twitter.com/rafaelcodes) for his work in making this possible!
71 |
72 | [1] This feature is still new and plans are to make it easier to configure as they receive feedback on its usage.
73 |
74 | """
75 |
76 | Article(
77 | title = "Mocking Kotlin with Mockito",
78 | url = "http://hadihariri.com/2016/10/04/Mocking-Kotlin-With-Mockito/",
79 | categories = listOf(
80 | "Kotlin",
81 | "Testing"
82 | ),
83 | type = article,
84 | lang = EN,
85 | author = "Hadi Hariri",
86 | date = LocalDate.of(2016, 10, 4),
87 | body = body
88 | )
89 |
--------------------------------------------------------------------------------
/articles/english/2016/More Kotlin Features to Love.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Constants are important
10 | One of the things that I’ve come to appreciate more and more as a programmer are constants. Before I would have yawned and said big deal why? Now I’d say they are so important as they prevent so many needless bugs. If we are guaranteed that something is not null then we can focus simply on getting our work done instead having to null check the world.
11 |
12 | that is gnarly
13 | In Java we used the final keyword to create a constant. Unfortunately the gnarly requirement for using the final keyword is that you must either declare the value inline or set it in the constructor. I’ve run into a fair number of cases where I want something to be final, but don’t know it yet, worse is when it belongs in a class but will not be available until after that class has been constructed and had one of it’s methods executed. Fortunately Kotlin allows us to have constants declared that aren’t required to be set during the constructor. We can use the lazy keyword:
14 |
15 | ```kotlin
16 | val myConstant : String by Lazy{
17 | calculateConstant();
18 | }
19 | ```
20 |
21 | This allows us to have a constant that is instantiated the first time myConstant is used. This is perfect for two reasons:
22 |
23 | 1. We don’t need to do this calculation in the constructor(which is bad anyways as it violates SOLID principles by having logic in the constructor other than variable assignment)
24 | 2. The result of the Lazy calculation is cached, and will not be run in subsequent requests(good for expensive calculations)
25 |
26 | ## Sort of Ternary Operator
27 |
28 | While Kotlin doesn’t have a true Ternary Operator it does have an operator that comes close that I had not noticed before:
29 |
30 | ```kotlin
31 | println(listOfStrings?.size ?: "empty") // will first check if the strings is not null and print the size, or empty if it is null
32 | ```
33 |
34 | ## Kotlin is concise
35 |
36 | The common theme I keep coming back to with Kotlin is that the language allows use to concisely write code. For example in Java if we wanted to execute a block of code if a null check was passed we’d do this:
37 |
38 | ```kotlin
39 | if (object != null) {
40 | // do some action with object
41 | }
42 | ```
43 |
44 | but in Kotlin we can be more concise and do the following:
45 |
46 | ```kotlin
47 | object?.let {
48 | // if object is not null execute what is in the curly braces
49 | }
50 | ```
51 |
52 | It’s a much simpler syntax for doing the same thing
53 |
54 | 
55 | """
56 |
57 | Article(
58 | title = "More Kotlin Features to Love",
59 | url = "http://blog.jimbaca.com/2016/02/22/more-kotlin-features-to-love/",
60 | categories = listOf(
61 | "Kotlin"
62 | ),
63 | type = article,
64 | lang = EN,
65 | author = "Jim Baca",
66 | date = LocalDate.of(2016, 2, 22),
67 | body = body
68 | )
69 |
--------------------------------------------------------------------------------
/articles/english/2016/News from KotlinTest.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | In the last weeks [KotlinTest](https://github.com/kotlintest/kotlintest) got some new and useful features:
10 |
11 | ## Testing for Exceptions
12 |
13 | ```kotlin
14 | val exception = shouldThrow {
15 | // code in here that you expect to throw an IllegalAccessException
16 | }
17 | exception.message should start with "Something went wrong"
18 | ```
19 |
20 | ## Before and after each
21 |
22 | ```kotlin
23 | override fun beforeEach() {
24 | println("Test starting")
25 | }
26 |
27 | override fun afterEach() {
28 | println("Test completed")
29 | }
30 | ```
31 |
32 |
33 | ## Test configuration
34 |
35 | Each test case can followed by a call to the `config` function.
36 |
37 | To execute a test two times with two threads you would write:
38 |
39 | ```kotlin
40 | class MyTests : ShouldSpec() {
41 | init {
42 |
43 | should("return the length of the string") {
44 | "sammy".length shouldBe 5
45 | "".length shouldBe 0
46 | }.config(invocations = 10, threads = 2)
47 |
48 | }
49 | }
50 | ```
51 |
52 | You can tag tests to be able run them selectively:
53 |
54 | ```kotlin
55 | ...
56 | }.config(tags = listOf("database", "linux"))
57 | ```
58 |
59 | Timeouts are configured like this:
60 |
61 | ```kotlin
62 | ...
63 | }.config(timeout = 2, timeoutUnit = TimeUnit.SECONDS)
64 | ```
65 |
66 | To ignore a test, you set `ignored` to true:
67 |
68 | ```kotlin
69 | ...
70 | }.config(ignored = true)
71 | ```
72 |
73 | ## Future
74 |
75 | Some more features like property based (and table driven) testing are on the roadmap.
76 | """
77 |
78 | Article(
79 | title = "News from KotlinTest",
80 | url = "https://discuss.kotlinlang.org/t/news-from-kotlintest/1797",
81 | categories = listOf(
82 | "Testing",
83 | "Kotlin"
84 | ),
85 | type = article,
86 | lang = EN,
87 | author = "medium",
88 | date = LocalDate.of(2016, 6, 14),
89 | body = body
90 | )
91 |
--------------------------------------------------------------------------------
/articles/english/2016/PaperParcel with Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | When I started to code in kotlin, one of the libraries that I found that was really useful is [PaperParcel](https://github.com/grandstaish/paperparcel). PaperParcel is a library that would generate Parcelable using annotation. The good thing about it, is that it will reduce the amount of code and mistake you could make if you manually create those classes. Having said that, the library is not purely for Kotlin and it could be used in Java Android project.
10 |
11 | To use it in kotlin
12 | You will need to add these to your app build gradle dependencies
13 |
14 | ```gradle
15 | compile 'com.github.grandstaish.paperparcel:paperparcel:1.0.0-rc4'
16 | compile 'com.github.grandstaish.paperparcel:paperparcel-kotlin:1.0.0-rc4'
17 | kapt 'com.github.grandstaish.paperparcel:compiler:1.0.0-rc4'
18 | ```
19 |
20 | while still in that gradle file, add these before dependencies
21 |
22 | ```gradle
23 | kapt {
24 | generateStubs = true
25 | }
26 | repositories {
27 | maven { url 'https://jitpack.io' }
28 | }
29 | ```
30 |
31 | Now the fun part, this is taken from my app [Daily Picture Quotes](https://play.google.com/store/apps/details?id=com.monmonja.dailyPictureQuotes)
32 |
33 | ```kotlin
34 | @PaperParcel
35 | data class QuoteImage(val id: String = "",
36 | val name: String = "",
37 | val text_quote: String = "",
38 | val url: String = "",
39 | val created: String = "",
40 | val cursor:String? = "") : PaperParcelable {
41 | companion object {
42 | @JvmField val CREATOR = PaperParcelable.Creator(QuoteImage::class.java)
43 | }
44 | }
45 | ```
46 |
47 | Thats about it, you can use QuoteImage to pass around Activities or Fragment or use it with your custom class.
48 |
49 | Two things you have to remember is that your data class name must be supplied in PaperParcelable.Creator and every time you make changes to this data class (atleast for me) you have to do rebuild project.
50 |
51 | If this interest you then have a check on the [kotlin usage](https://github.com/grandstaish/paperparcel/wiki/Kotlin-Usage) section of their github page.
52 |
53 | Hope this helps :)
54 | """
55 |
56 | Article(
57 | title = "PaperParcel with Kotlin",
58 | url = "http://www.tutorialforandroid.com/2016/08/paperparcel-with-kotlin.html",
59 | categories = listOf(
60 | "Kotlin",
61 | "Android"
62 | ),
63 | type = article,
64 | lang = EN,
65 | author = "Almond Joseph Mendoza",
66 | date = LocalDate.of(2016, 8, 10),
67 | body = body
68 | )
69 |
--------------------------------------------------------------------------------
/articles/english/2016/Revisiting Types In Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | With A Domain Driven Approach, This Talk Will Go Through Several Coding Examples And How They Can Be Improved By Leveraging The Powerful Type System In Kotlin With Function Objects, Sealed Classes, Tuples, And The Core Collections. We'll Review The Way Your Application Communicates Across Layers, And How You Can Improve Your Apis With Explicit Types.
10 |
11 |
12 |
13 | """
14 |
15 | Article(
16 | title = "Revisiting Types In Kotlin",
17 | url = "https://www.youtube.com/watch?v=zBs8Jptdb-g",
18 | categories = listOf(
19 | "Kotlin"
20 | ),
21 | type = video,
22 | lang = EN,
23 | author = "Francisco Estevez",
24 | date = LocalDate.of(2016, 12, 17),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/english/2016/Spring Boot and Kotlin, a match made in Heaven.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Despite being very new, spring boot has seen a spectacular start as an amazing kickstarter for spring-based application. You can now start your project in a matter of minutes, not days!
10 |
11 | On the other hand, you're still using Java, with all its ceremony regarding code... Wouldn't it be great if we could pair Spring Boot with a powerful yet simple language?
12 |
13 | In this talk, I'll live code a Spring Boot application using Kotlin, the friendly language provided by JetBrains. Come discover how you can now cut through all the red tape and finally focus only the important stuff.
14 |
15 |
16 |
17 | """
18 |
19 | Article(
20 | title = "Spring Boot and Kotlin, a match made in Heaven",
21 | url = "https://www.youtube.com/watch?v=",
22 | categories = listOf(
23 | "Kotlin"
24 | ),
25 | type = video,
26 | lang = EN,
27 | author = "Nicolas Frankel",
28 | date = LocalDate.of(2016, 10, 23),
29 | body = body
30 | )
31 |
--------------------------------------------------------------------------------
/articles/english/2016/Spring Tips the Kotlin Programming Language.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | Hi Spring fans! In this tip, we’ll quickly look at the Kotlin programming language and some very high-level things you need to know when building Spring Boot and Kotlin applications
11 |
12 |
13 |
14 | """
15 |
16 | Article(
17 | title = "Spring Tips: the Kotlin Programming Language",
18 | url = "https://www.youtube.com/watch?v=90WRtrbRi0Y",
19 | categories = listOf(
20 | "Kotlin"
21 | ),
22 | type = video,
23 | lang = EN,
24 | author = "Josh Long",
25 | date = LocalDate.of(2016, 10, 19),
26 | body = body
27 | )
28 |
--------------------------------------------------------------------------------
/articles/english/2016/The Kobalt diaries testing.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Kobalt automatically detects how to run your tests based on the test dependencies that you declared:
10 |
11 | ```kotlin
12 | dependenciesTest {
13 | compile("org.testng:testng:6.9.9")
14 | }
15 | ```
16 |
17 | By default, Kobalt supports TestNG, JUnit and Spek. You can also configure how your tests run with the test{} directive:
18 |
19 | ```Kotlin
20 | test {
21 | args("-excludegroups", "broken", "src/test/resources/testng.xml")
22 | }
23 | ```
24 |
25 | The full list of configuration parameters can be found in the [TestConfig](https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/TestDirective.kt#L6) class.
26 |
27 | Additionally, you can define multiple test configurations, each with a different name. Each configuration will create an additional task named "test" followed by the name of that configuration. For example:
28 |
29 | ```Kotlin
30 | test {
31 | args("-excludegroups", "broken", "src/test/resources/testng.xml")
32 | }
33 |
34 | test {
35 | name = "All"
36 | args("src/test/resources/testng.xml")
37 | }
38 | ```
39 |
40 | The first configuration has no name, so it will be launched with the task "test", while the second one can be run with the task "testAll".
41 |
42 | The full series of articles on Kobalt can be found [here](http://beust.com/weblog/category/kobalt/).
43 |
44 | """
45 |
46 | Article(
47 | title = "The Kobalt diaries: testing",
48 | url = "http://beust.com/weblog/2016/02/20/the-kobalt-diaries-testing/",
49 | categories = listOf(
50 | "Kotlin",
51 | "Kobalt"
52 | ),
53 | type = article,
54 | lang = EN,
55 | author = "Cédric Beust",
56 | date = LocalDate.of(2016, 2, 20),
57 | body = body
58 | )
59 |
--------------------------------------------------------------------------------
/articles/english/2016/Type safe JavaFX CSS with TornadoFX.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 |
12 | """
13 |
14 | Article(
15 | title = "Type safe JavaFX CSS with TornadoFX",
16 | url = "https://www.youtube.com/watch?v=rjc8_HGHy3c",
17 | categories = listOf(
18 | "Kotlin",
19 | "TornadoFx"
20 | ),
21 | type = video,
22 | lang = EN,
23 | author = "Edvin Syse",
24 | date = LocalDate.of(2016, 4, 24),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/english/2016/UI Testing separating Assertions from Actions with Kotlin DSL.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Hello, dear reader!
10 |
11 | Recently Jake Wharton did a talk ["Instrumentation Testing Robots"](https://realm.io/news/kau-jake-wharton-testing-robots/) 📺.
12 |
13 | The pattern itself is not a new concept, **but** combining it with [Kotlin DSL](https://kotlinlang.org/docs/reference/type-safe-builders.html) is pretty nice! So we decided to try it for our [Juno app](https://play.google.com/store/apps/details?id=com.gojuno.rider) which is fully written in Kotlin, including Unit, Integration and Functional tests.
14 |
15 | What we found is that mixing Actions and Assertions inside "Robots" (we call them Screens) doesn't look great, both for tests readability and "Robot" maintenance 🤖 (same is true for regular Screen abstractions).
16 |
17 | > Though I used mixed variant for years... (sigh). For some reason, only seeing screen abstraction as a Kotlin DSL finally clicked that we need to divide assertions from actions.
18 |
19 | #### Before: mixed Actions and Assertions 😿
20 |
21 | ```kotlin
22 | // We actually use Spek but unfortunately I can't say
23 | // that it works great for instrumentation tests yet...
24 | @Test fun loginAndPasswordAreEntered() {
25 | loginScreen {
26 |
27 | login("artem_zin")
28 | password("*****")
29 |
30 | loginButtonActivated()
31 | noLoginWarnings()
32 | noPasswordWarnings()
33 | }
34 | }
35 | ```
36 |
37 | #### After: Assertions are separated from Actions 😸
38 |
39 | ```kotlin
40 | @Test fun loginAndPasswordAreEntered() {
41 | loginScreen {
42 |
43 | login("artem_zin")
44 | password("*****")
45 |
46 | assert {
47 | loginButtonActivated()
48 | noLoginWarnings()
49 | noPasswordWarnings()
50 | }
51 | }
52 | }
53 | ```
54 |
55 | Now that's a clear separation of actions and assertions, right? Same is true for internal structure of `LoginScreen` class:
56 |
57 | ```kotlin
58 | fun loginScreen(func: LoginScreen.() -> Unit) = LoginScreen().apply { func() }
59 |
60 | class LoginScreen {
61 |
62 | fun login(login: String) = enterText(R.id.login, email)
63 | fun password(password: String) = enterText(R.id.password, password)
64 | fun assert(func: Assert.() -> Unit) = Assert().apply { func() }
65 |
66 | // Previously all these assertions
67 | // were on the same level in the LoginScreen class as actions.
68 | class Assert {
69 | fun loginButtonActivated() = ...
70 | fun noLoginWarnings() = ...
71 | fun noPasswordWarnings() = ...
72 | }
73 | }
74 | ```
75 |
76 | > Write tests and take care!
77 |
78 | """
79 |
80 | Article(
81 | title = "UI Testing: separating Assertions from Actions with Kotlin DSL",
82 | url = "https://artemzin.com/blog/ui-testing-separating-assertions-from-actions-with-kotlin-dsl/",
83 | categories = listOf(
84 | "Kotlin",
85 | "Testing"
86 | ),
87 | type = article,
88 | lang = EN,
89 | author = "Artem Zinnatullin",
90 | date = LocalDate.of(2016, 7, 27),
91 | body = body
92 | )
93 |
--------------------------------------------------------------------------------
/articles/english/2016/Using Mockito for unit testing with Kotlin (1x).kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Dependencies:
10 |
11 | ```gradle
12 |
13 | // Android stuff...
14 | dependencies {
15 | //...
16 | compile "org.jetbrains.kotlin:kotlin-stdlib:1.0.0"
17 |
18 | testCompile 'junit:junit:4.12'
19 | testCompile 'org.mockito:mockito-core:2.0.42-beta'
20 | testCompile('com.squareup.assertj:assertj-android:1.1.1') {
21 | exclude group: 'com.android.support', module: 'support-annotations'
22 | }
23 | }
24 |
25 | ```
26 |
27 | ## Little Notes
28 |
29 | * All the functions AND PROPERTIES should be open, by default functions and properties are final and mockito cant mock them.
30 | * **DONT USE** spy functions make tests fail bc of some weird crash (*if someone had use them right comment!!*).
31 |
32 | ## Example
33 |
34 | We will show:
35 |
36 | 1. `Settings`: manage settings storage, where to store them and which ones.
37 | 2. `SettingsView`: ...
38 | 3. `SettingsPresenter`: manage the bussiness logic for the settings.
39 |
40 | You may have a class `Settings`:
41 |
42 | ```kotlin
43 | open class Settings(context: Context) {
44 | val localCache = LocalCache(context)
45 |
46 | open var playJustWithHeadphones: Boolean
47 | get() = localCache.get("headphones", false)
48 | set(value) = localCache.put("headphones", value)
49 | }
50 | ```
51 |
52 | Then a presenter that use those settings:
53 |
54 | ```kotlin
55 | class SettingsPresenter {
56 | private var mSettings: Settings? = null
57 | private var mView: SettingsView? = null
58 |
59 | fun onCreate(view: SettingsView, settings: Settings) {
60 | mView = view
61 | mSettings = settings
62 |
63 | view.setHeadphonesToggleCheck(settings.playJustWithHeadphones)
64 | }
65 | }
66 | ```
67 |
68 | Check that mocked Settings class **is open** and mocked var property **is open**
69 |
70 | Then the tests passing:
71 |
72 | ```kotlin
73 | class SettingsPresenterTests {
74 | @Mock lateinit var mockedView: SettingsView
75 | @Mock lateinit var mockedSettings: Settings
76 | lateinit var presenter: SettingsPresenter
77 |
78 | @Before
79 | fun setUp() {
80 | MockitoAnnotations.initMocks(this)
81 | presenter = SettingsPresenter()
82 | }
83 |
84 | @Test
85 | fun test_onCreate_updateGui() {
86 | Mockito.`when`(mockedSettings.playJustWithHeadphones).thenReturn(true)
87 | presenter.onCreate(mockedView, mockedSettings)
88 |
89 | Mockito.verify(mockedView).setHeadphonesToggleCheck(true)
90 | }
91 | }
92 | ```
93 |
94 | ## Notes
95 | * Using `lateinit` to let the variables be initialized on `@Before` and avoid using `?` or `!!` all over the tests.
96 | * `SettingsView` and `Settings` are mocked using `MockitoAnnotations`
97 | """
98 |
99 | Article(
100 | title = "Using Mockito for unit testing with Kotlin (1/x)",
101 | url = "http://makingiants.com/blog/using-mockito-for-unit-tests-with-kotlin-1x/",
102 | categories = listOf(
103 | "Android",
104 | "Kotlin"
105 | ),
106 | type = article,
107 | lang = EN,
108 | author = "MAKINGIANTS",
109 | date = LocalDate.of(2016, 2, 20),
110 | body = body
111 | )
112 |
--------------------------------------------------------------------------------
/articles/english/2016/Writing Gradle Build Scripts in Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | As you may have heard Kotlin-based build scripting is coming in Gradle 3.0. In this talk Chris Beams and Rodrigo B. de Oliveira will cover the motivation behind providing first-class support for Kotlin-based build scripts as well as the principles and design tradeoffs that drive the effort. We’ll demonstrate a Kotlin-based Gradle build in action show you how to try it for yourself and share details about the project roadmap.
10 |
11 |
12 |
13 | """
14 |
15 | Article(
16 | title = "Writing Gradle Build Scripts in Kotlin",
17 | url = "https://www.youtube.com/watch?v=vv4zh_oPBTw",
18 | categories = listOf(
19 | "Kotlin",
20 | "Gradle"
21 | ),
22 | type = video,
23 | lang = EN,
24 | author = "Chris Beams & Rodrigo B. de Oliveiranp",
25 | date = LocalDate.of(2016, 8, 5),
26 | body = body
27 | )
28 |
--------------------------------------------------------------------------------
/articles/english/2016/You can do Better with Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LinkType.*
4 | import link.kotlin.scripts.LanguageCodes.*
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | The Kotlin programming language is gaining popularity amongst the Android developer community. It’s a modern language that gives more power in everyday routines. Kotlin code generally looks cleaner and nicer, and it’s much easier to work with when you have less verbosity or code duplication. And this is especially noticeable comparing with the soon-to-be-archaic versions of Java used on Android.
10 |
11 | But what’s even more important, is that Kotlin is 100% compatible with all existing Java frameworks, and has good tooling in Android Studio and IntelliJ IDEA. It’s a pragmatic language with a very low learning curve, and can be quickly grasped by Java developers.
12 |
13 | In this talk we’ll discuss the concepts of the language that provide the desired expressiveness, as well as additional goodies designed specifically for Android.
14 |
15 |
16 |
17 | """
18 |
19 | Article(
20 | title = "You can do Better with Kotlin",
21 | url = "https://www.youtube.com/watch?v=Es32UqHNza0",
22 | categories = listOf(
23 | "Kotlin",
24 | "Android"
25 | ),
26 | type = video,
27 | lang = EN,
28 | author = "Svetlana Isakova",
29 | date = LocalDate.of(2016, 5, 24),
30 | body = body
31 | )
32 |
--------------------------------------------------------------------------------
/articles/english/2017/Announcing KotlinConf.kts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import link.kotlin.scripts.Article
4 | import link.kotlin.scripts.LanguageCodes.EN
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | Over the past year we have seen significant growth in Kotlin adoption, represented not only by the lines of Kotlin code on GitHub ([8M new lines of code since 1.0 release][]) but also by the numerous companies that have been reaching out to us about their usage, the number of talks being presented by community members at conferences, the increase in new frameworks and libraries, new user groups and meet-ups, as well as community events
11 |
12 | To thank the wonderful Kotlin community, and to also share the most exciting things happening in Kotlin, we’re happy to announce [KotlinConf][]**,** a two-day event taking place in San Francisco, November 2017.
13 |
14 |
15 | [![KotlinConf][KotlinConf 1]][KotlinConf]
16 |
17 |
18 | We’ll be opening up registration soon with early-bird tickets, so make sure you [sign-up for updates][KotlinConf].
19 |
20 | ## Call for Papers now open ##
21 |
22 | We have keynotes lined up by **Andrey Breslav** and **Erik Meijer**, and talks by some other speakers that we’ll be announcing shortly. But this is a community event and we want you, as members of the Kotlin community to also participate in the conference. As such, there is an open [Call for Papers][] where you can submit talks on things you’ve been doing with Kotlin and would like to share. While there is no rush, don’t delay because the call ends on the 1st of May 2017.
23 |
24 | If you have any questions regarding the conference, please send an email to [info@kotlinconf.com][info_kotlinconf.com]. You can also ask questions on \#kotlinconf on [Slack][]. For sponsorship enquires, please email [sponsorship@kotlinconf.com][sponsorship_kotlinconf.com].
25 |
26 | **2017 is going to be an exciting year for Kotlin and we hope to celebrate it with you in November!**
27 |
28 |
29 | [8M new lines of code since 1.0 release]: https://blog.jetbrains.com/kotlin/2017/03/kotlin-1-1/
30 | [KotlinConf]: https://kotlinconf.com/
31 | [KotlinConf 1]: https://i0.wp.com/blog.jetbrains.com/kotlin/files/2017/03/KotlinConfBannerSmaller.png?resize=640%2C332&ssl=1
32 | [Call for Papers]: https://sessionize.com/kotlinconf
33 | [info_kotlinconf.com]: mailto:info@kotlinconf.com
34 | [Slack]: https://kotlinlang.slack.com/
35 | [sponsorship_kotlinconf.com]: mailto:sponsorship@kotlinconf.com
36 | """
37 |
38 | Article(
39 | title = "Announcing KotlinConf",
40 | url = "https://blog.jetbrains.com/kotlin/2017/03/announcing-kotlinconf/",
41 | categories = listOf(
42 | "Kotlin"
43 | ),
44 | type = article,
45 | lang = EN,
46 | author = "Hadi Hariri",
47 | date = LocalDate.of(2017, 3, 14),
48 | body = body
49 | )
50 |
--------------------------------------------------------------------------------
/articles/english/2017/Future of Kotlin - How agile can language development be video.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.video
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | A successful project usually grows, and Kotlin is no exception. We are adding new targets (JavaScript and Native) and new computation models (coroutines). This talk is about our vision of the future of Kotlin as a language and a ecosystem.
10 |
11 | We'll talk strategy: what we think our industry needs at large and how we are going to fit Kotlin into this picture. We'll talk tactics: how we deal with legacy and compatibility issues, and whether there will ever be Kotlin 2.0. We'll talk operations: can we do “continuous delivery” for language features? Or, more generally, how agile can language development be?
12 |
13 |
14 | """
15 |
16 | Article(
17 | title = "The Future of Kotlin: How agile can language development be?",
18 | url = "https://mixitconf.org/en/2017/the-future-of-kotlin-how-agile-can-language-development-be-",
19 | categories = listOf(
20 | "Kotlin"
21 | ),
22 | type = video,
23 | lang = EN,
24 | author = "Andrey Breslav",
25 | date = LocalDate.of(2017, 4, 30),
26 | body = body
27 | )
28 |
--------------------------------------------------------------------------------
/articles/english/2017/Future of Kotlin - How agile can language development be.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.slides
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Future of Kotlin - How agile can language development be?",
14 | url = "https://www.slideshare.net/abreslav/future-of-kotlin-how-agile-can-language-development-be",
15 | categories = listOf(
16 | "Kotlin"
17 | ),
18 | type = slides,
19 | lang = EN,
20 | author = "Andrey Breslav",
21 | date = LocalDate.of(2017, 4, 22),
22 | body = body
23 | )
24 |
--------------------------------------------------------------------------------
/articles/english/2017/Kotlin 1.0.7 is out.kts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import link.kotlin.scripts.Article
4 | import link.kotlin.scripts.LanguageCodes.EN
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | We’re happy to announce that Kotlin 1.0.7, the last update in the Kotlin 1.0.x series, is out. The main focus of this update is to backport the fixes related to Gradle and annotation processing so that they become available to those who can’t upgrade to version 1.1 at this time. The complete list of fixes is available in the [changelog](https://github.com/JetBrains/kotlin/blob/1.0.7/ChangeLog.md).
11 |
12 | To use the new version in your Maven or Gradle builds, simply change the Kotlin version number in your build scripts. The command-line compiler can be downloaded from the [Github release page](https://github.com/JetBrains/kotlin/releases/tag/v1.0.7).
13 |
14 | In IntelliJ IDEA and Android Studio, we recommend to use the 1.1 version of the plugin, and to switch the language version to 1.0 if you’re using Kotlin 1.0.7 to build your project. If you do want to install the version 1.0.7 of the plugin, you can do so by downloading the version for your IDE from the [Kotlin plugin Web site](https://plugins.jetbrains.com/plugin/6954-kotlin) and using the “Install plugin from disk…” button.
15 |
16 | As usual, if you run into any problems with the new release, you’re welcome to ask for help on the [forums](https://discuss.kotlinlang.org/), on Slack (get an invite [here](http://kotlinslackin.herokuapp.com/)), or to report issues in the [issue tracker](https://youtrack.jetbrains.com/issues/KT).
17 |
18 | Let’s Kotlin!
19 | """
20 |
21 | Article(
22 | title = "Kotlin 1.0.7 is out",
23 | url = "https://blog.jetbrains.com/kotlin/2017/03/kotlin-1-0-7-is-out/",
24 | categories = listOf(
25 | "Kotlin"
26 | ),
27 | type = article,
28 | lang = EN,
29 | author = "Dmitry Jemerov",
30 | date = LocalDate.of(2017, 3, 15),
31 | body = body
32 | )
33 |
--------------------------------------------------------------------------------
/articles/english/2017/Kotlin 1.1 Event Report.kts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import link.kotlin.scripts.Article
4 | import link.kotlin.scripts.LanguageCodes.EN
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | The Kotlin 1.1 release was warmly met by the community. To demonstrate the new features in Kotlin 1.1, JetBrains offered an online event. All those interested were able to watch a live stream of Andrey Breslav’s demo presentation and get their questions answered during a Q&A session.
11 |
12 | This motivated many local communities to meet up: more than 30 user groups hosted events in 21 countries.
13 |
14 | You can find the full list of the events at [the Kotlin community web page][]. Over 3000 people joined the broadcast on the day of the event.
15 |
16 | The recording of the demo presentation and the Q&A is available on YouTube:
17 |
18 |
19 |
20 | ## Kotlin 1.1 Event Feedback ##
21 |
22 | If you watched the live stream, we want to know what you think! Please share your feedback by [completing this form][]. It should only take about 7-10 minutes. Your input is very important in helping us improve all future Kotlin events.
23 |
24 | ## Kotlin Future Features Survey ##
25 |
26 | ![future\_features\_collage\_2][future_features_collage_2]
27 | We also offered all communities to make an impact on Kotlin future. Event organizers received survey kits and event participants could have a say on the most expected features in an off-line mode. The survey gained much attention, and we’ve now placed it online to listen to the wider community. Now you can [have your say on the Kotlin future][] online!
28 |
29 | Please note it’s more likely that you won’t see those features in v1.2, but we will take your opinion into account when prioritizing our work.
30 |
31 | [the Kotlin community web page]: http://kotlinlang.org/community/talks.html?time=kotlin
32 | [completing this form]: https://docs.google.com/forms/d/e/1FAIpQLSdgKsJzwc1ToAusi-xpEiiE1O4t3HA5xjlbZXDU5Mg0i3qvNg/viewform
33 | [future_features_collage_2]: https://d3nmt5vlzunoa1.cloudfront.net/kotlin/files/2017/04/collage_2.png
34 | [have your say on the Kotlin future]: https://docs.google.com/forms/d/e/1FAIpQLSdnCgBonEV5pwN8L903BzdYb9Baf0dpwsJ5YrKnxLveiLFkEQ/viewform
35 | """
36 |
37 | Article(
38 | title = "Kotlin 1.1 Event Report",
39 | url = "https://blog.jetbrains.com/kotlin/2017/04/kotlin-1-1-event-report/",
40 | categories = listOf(
41 | "Kotlin"
42 | ),
43 | type = article,
44 | lang = EN,
45 | author = "Alina Dolgikh",
46 | date = LocalDate.of(2017, 4, 6),
47 | body = body
48 | )
49 |
--------------------------------------------------------------------------------
/articles/english/2017/Kotlin 1.1 Event in Your City.kts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import link.kotlin.scripts.Article
4 | import link.kotlin.scripts.LanguageCodes.EN
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | We are holding the [Kotlin 1.1 event on March 23][]. Tune in to the live stream [at JetBrains TV][] and see **Andrey Breslav’s demo presentation** about the key features of Kotlin 1.1, including coroutines, JavaScript back-end and more.
11 |
12 | Start tweeting your questions today and get answers during the **Q&A session live stream** on March 23. Use the hashtag \#kotlinqa.
13 |
14 | We hold 2 live streams to accommodate different time zones. See **the detailed schedule and guidelines** [in the blogpost][Kotlin 1.1 event on March 23].
15 |
16 | Check if there is a **Kotlin 1.1 event in your city**. If you don’t find a local community event, join the live stream individually.
17 |
18 | [](http://kotlinlang.org/community/talks.html?time=kotlin)
19 |
20 | Please note that the time of the live stream for the US has been changed to PDT time. The first live stream will start at 9 am PDT and the second at 11 am PDT.
21 |
22 | [Kotlin 1.1 event on March 23]: https://blog.jetbrains.com/kotlin/2017/03/kotlin-1-1-event-2/#more-4726
23 | [at JetBrains TV]: http://jb.gg/kotlinevent1_1
24 | """
25 |
26 | Article(
27 | title = "Kotlin 1.1 Event in Your City",
28 | url = "https://blog.jetbrains.com/kotlin/2017/03/kotlin-1-1-event-in-your-city-2/",
29 | categories = listOf(
30 | "Kotlin"
31 | ),
32 | type = article,
33 | lang = EN,
34 | author = "Alina Dolgikh",
35 | date = LocalDate.of(2017, 3, 21),
36 | body = body
37 | )
38 |
--------------------------------------------------------------------------------
/articles/english/2017/Kotlin 1.1.1 is out.kts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import link.kotlin.scripts.Article
4 | import link.kotlin.scripts.LanguageCodes.EN
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | Today we’re releasing the first bugfix update for **Kotlin 1.1**. The primary focus of this update is to address regressions causing incorrect code generation; we wanted to get those fixes out as quickly as possible. The details are available in the [changelog][].
11 |
12 | The specific changes worth highlighting are:
13 |
14 | * **Gradle incremental compilation** is now enabled by default. You can still turn it off as described in the [documentation][] if you need to.
15 | * Kotlin plugins are now available in the **[Gradle plugin portal][]**. See the [documentation][documentation 1] for usage instructions.
16 | * Using function types with receivers as parameter types of **JavaScript external declarations** is no longer allowed. Previously, lambdas passed to such parameters weren’t invoked with correct arguments, and there’s no easy workaround for this issue, so for now we’ve decided to disable the functionality.
17 |
18 | We’ve also updated the Kotlin [Eclipse][] and [NetBeans][] plugins to include Kotlin 1.1.1, so you can enjoy the benefits of the new Kotlin version regardless of your IDE choice.
19 |
20 | ## How to update ##
21 |
22 | To update the IDEA plugin, use Tools | Kotlin | Configure Kotlin Plugin Updates and press the “Check for updates now” button. Also, don’t forget to update the compiler and standard library version in your Maven and Gradle build scripts.
23 | The command-line compiler can be downloaded from the [Github release page][].
24 |
25 | As usual, if you run into any problems with the new release, you’re welcome to ask for help on the [forums][], on Slack (get an invite [here][]), or to report issues in the [issue tracker][].
26 |
27 | Let’s Kotlin!
28 |
29 | [changelog]: https://github.com/JetBrains/kotlin/blob/1.1.1/ChangeLog.md
30 | [documentation]: http://kotlinlang.org/docs/reference/using-gradle.html#incremental-compilation
31 | [Gradle plugin portal]: https://plugins.gradle.org/
32 | [documentation 1]: http://kotlinlang.org/docs/reference/using-gradle.html
33 | [Eclipse]: https://marketplace.eclipse.org/content/kotlin-plugin-eclipse
34 | [NetBeans]: http://plugins.netbeans.org/plugin/68590/kotlin
35 | [Github release page]: https://github.com/JetBrains/kotlin/releases/tag/v1.1.1
36 | [forums]: https://discuss.kotlinlang.org/
37 | [here]: http://kotlinslackin.herokuapp.com/
38 | [issue tracker]: https://youtrack.jetbrains.com/issues/KT
39 | """
40 |
41 | Article(
42 | title = "Kotlin 1.1.1 is out",
43 | url = "https://blog.jetbrains.com/kotlin/2017/03/kotlin-1-1-1-is-out/",
44 | categories = listOf(
45 | "Kotlin"
46 | ),
47 | type = article,
48 | lang = EN,
49 | author = "Dmitry Jemerov",
50 | date = LocalDate.of(2017, 3, 14),
51 | body = body
52 | )
53 |
--------------------------------------------------------------------------------
/articles/english/2017/Kotlin Native 0.2 Release.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | I would like to announce release of Kotlin/Native v0.2, with the following changes:
10 |
11 | * Added support for coroutines
12 | * Fixed most stdlib incompatibilities
13 | * Improved memory management performance
14 | * Cross-module inline function support
15 | * Unicode support independent from installed system locales
16 | * Interoperability improvements
17 | * file-based filtering in definition file
18 | * stateless lambdas could be used as C callbacks
19 | * any Unicode string could be passed to C function
20 | * Very basic debugging support
21 | * Improve compilation and linking performance
22 |
23 | One could download binaries from
24 | * http://download.jetbrains.com/kotlin/native/kotlin-native-linux-0.2.tar.gz
25 | * http://download.jetbrains.com/kotlin/native/kotlin-native-macos-0.2.tar.gz
26 | for Linux and Mac hosts respectively.
27 | Please report issues using https://youtrack.jetbrains.com/issues/KT (subsystem Native).
28 | """
29 |
30 | Article(
31 | title = "Kotlin Native 0.2 Release",
32 | url = "https://github.com/JetBrains/kotlin-native/releases/tag/v0.2.0",
33 | categories = listOf(
34 | "Kotlin",
35 | "Kotlin Native"
36 | ),
37 | type = article,
38 | lang = EN,
39 | author = "Nikolay Igotti",
40 | date = LocalDate.of(2017, 5, 11),
41 | body = body
42 | )
43 |
--------------------------------------------------------------------------------
/articles/english/2017/Kotlin-Native v0.2 is out.kts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import link.kotlin.scripts.Article
4 | import link.kotlin.scripts.LanguageCodes.EN
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | We’re happy to announce the release of Kotlin/Native v0.2, a feature and bugfix update to Kotlin/Native Technology Preview. This update adds support for coroutines and cross-module inline functions support, along with bugfixes and improvements all over the place.
11 |
12 | This release includes samples showing how to use [coroutines for concurrent non-blocking IO](https://github.com/JetBrains/kotlin-native/tree/master/samples/nonBlockingEchoServer), a [GUI application using GTK](https://github.com/JetBrains/kotlin-native/tree/master/samples/gtk), as well as a [TensorFlow machine learning framework ](https://github.com/JetBrains/kotlin-native/tree/master/samples/tensorflow)client contributed by Julius Kunze.
13 |
14 | For example, code as easy as
15 |
16 | ```kotlin
17 | var connectionId = 0
18 | acceptClientsAndRun(listenFd) {
19 | memScoped {
20 | val bufferLength = 100L
21 | val buffer = allocArray(bufferLength)
22 | val connectionIdString = "#${"$"}{++connectionId}: ".cstr
23 | val connectionIdBytes = connectionIdString.getPointer(this)
24 | try {
25 | while (true) {
26 | val length = read(buffer, bufferLength)
27 | if (length == 0L) break
28 | write(connectionIdBytes, connectionIdString.size.toLong())
29 | write(buffer, length)
30 | }
31 | } catch (e: IOException) {
32 | println("I/O error occurred: ${"$"}{e.message}")
33 | }
34 | }
35 | }
36 | ```
37 |
38 | can be used to process multiple concurrent socket IO with coroutines and serve each client individually and concurrently.
39 |
40 | And to create a GTK button with an event listener, just do:
41 |
42 | ```kotlin
43 | val button = gtk_button_new_with_label("Click me!")!!
44 | g_signal_connect(button, "clicked",
45 | staticCFunction { _: CPointer?, _: gpointer? -> println("Hi from Kotlin") }
46 | )
47 | ```
48 |
49 | So v0.2 release allows to create fully functional small-footprint native applications written in Kotlin.
50 |
51 | Both compilation and runtime performance were significantly improved, size of redistributable decreased.
52 |
53 | The complete list of changes in this release can be found in the [changelog.](https://github.com/JetBrains/kotlin-native/blob/v0.2.0/CHANGELOG.md)
54 |
55 | Pre-built binaries for [Linux](http://download.jetbrains.com/kotlin/native/kotlin-native-linux-0.2.tar.gz) and [MacOS](http://download.jetbrains.com/kotlin/native/kotlin-native-macos-0.2.tar.gz) hosts are available.
56 |
57 | This entry was posted in [Releases](https://blog.jetbrains.com/kotlin/category/releases/) and tagged [native](https://blog.jetbrains.com/kotlin/tag/native/), [newsletter](https://blog.jetbrains.com/kotlin/tag/newsletter/). Bookmark the [permalink](https://blog.jetbrains.com/kotlin/2017/05/kotlinnative-v0-2-is-out/).
58 | """
59 |
60 | Article(
61 | title = "Kotlin/Native v0.2 is out",
62 | url = "https://blog.jetbrains.com/kotlin/2017/05/kotlinnative-v0-2-is-out/",
63 | categories = listOf(
64 | "Kotlin",
65 | "Kotlin Native"
66 | ),
67 | type = article,
68 | lang = EN,
69 | author = "Nikolay Igotti",
70 | date = LocalDate.of(2017, 5, 12),
71 | body = body
72 | )
73 |
--------------------------------------------------------------------------------
/articles/english/2017/Our first book about Kotlin is out.kts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import link.kotlin.scripts.Article
4 | import link.kotlin.scripts.LanguageCodes.EN
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | We’re happy to announce that [Kotlin in Action][] – a book about Kotlin written by the members of the Kotlin team – is now out, as both a eBook and a printed book. The book is written for experienced Java developers and covers all aspects of the language, without focusing on any specific problem domain. We received a lot of positive feedback about the book during Manning’s Early Access Preview program, so we hope that you’ll enjoy it too!
11 |
12 | ![Kotlin in Action book][]
13 |
14 |
15 | Two chapters from the book, covering Kotlin’s type system and its support for domain-specific languages, are available as a [free preview][] on the publisher’s Web site. And in our online mini-IDE for Kotlin, you can try out all examples from the book, starting from the [very first one][], also for free.
16 |
17 | To accompany the release of the book, Manning is offering a special discount, valid today only: you can get half off the book if you enter the code *dotd021017au* during checkout.
18 |
19 | Happy reading, and have a nice Kotlin!
20 |
21 |
22 | [Kotlin in Action]: https://www.manning.com/books/kotlin-in-action
23 | [Kotlin in Action book]: https://d3nmt5vlzunoa1.cloudfront.net/kotlin/files/2017/02/20170209_112611.jpeg
24 | [free preview]: https://www.manning.com/books/kotlin-in-action#downloads
25 | [very first one]: http://try.kotlinlang.org/#/Kotlin%20in%20Action/chapter%201/1.1/1.1_ATasteOfKotlin.kt
26 | """
27 |
28 | Article(
29 | title = "Our first book about Kotlin is out",
30 | url = "https://blog.jetbrains.com/kotlin/2017/02/our-first-book-about-kotlin-is-out/",
31 | categories = listOf(
32 | "Kotlin"
33 | ),
34 | type = article,
35 | lang = EN,
36 | author = "Dmitry Jemerov",
37 | date = LocalDate.of(2017, 2, 10),
38 | body = body
39 | )
40 |
--------------------------------------------------------------------------------
/articles/english/2017/Reactor Kotlin Extensions 1.0.0.M1 released.kts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import link.kotlin.scripts.Article
4 | import link.kotlin.scripts.LanguageCodes.EN
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | I am excited to announce the release of the first milestone of [Reactor Kotlin Extensions](https://github.com/reactor/reactor-kotlin-extensions), which provides Kotlin extensions for Reactor API.
11 |
12 | It provides support for Kotlin types like `KClass`, takes advantage of Kotlin [reified type parameters](http://kotlinlang.org/docs/reference/inline-functions.html#reified-type-parameters) and provide various extensions to allow more expressive code. You can see bellow a quick comparaison of Reactor with Java versus Reactor with Kotlin + extensions.
13 |
14 | | Java | Kotlin with extensions |
15 | |----------------------------------------------|----------------------------------------------|
16 | | `Mono.just("foo")` | `"foo".toMono()` |
17 | | `Flux.fromIterable(list)` | `list.toFlux()` |
18 | | `Mono.error(new RuntimeException())` | `RuntimeException().toMono()` |
19 | | `Flux.error(new RuntimeException())` | `RuntimeException().toFlux()` |
20 | | `flux.ofType(Foo.class)` | `flux.ofType()` or `flux.ofType(Foo::class)` |
21 | | `StepVerifier.create(flux).verifyComplete()` | `flux.test().verifyComplete()` |
22 |
23 | To use it in your project, add `https://repo.spring.io/milestone` repository and `io.projectreactor:reactor-kotlin-extensions:1.0.0.M1` dependency.
24 |
25 | This is the very first milestone, so feel free to create issues and submit pull requests on [reactor-kotlin-extensions](https://github.com/reactor/reactor-kotlin-extensions) GitHub project.
26 | """
27 |
28 | Article(
29 | title = "Reactor Kotlin Extensions 1.0.0.M1 released",
30 | url = "https://spring.io/blog/2017/03/28/reactor-kotlin-extensions-1-0-0-m1-released",
31 | categories = listOf(
32 | "Kotlin",
33 | "Spring"
34 | ),
35 | type = article,
36 | lang = EN,
37 | author = "Sébastien Deleuze",
38 | date = LocalDate.of(2017, 3, 28),
39 | body = body
40 | )
41 |
--------------------------------------------------------------------------------
/articles/english/2017/The Design and Construction of Modern Build Tools.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tibbi/awesome-kotlin/14ffb188025297d56d7ce9d1f287555e0913d7f1/articles/english/2017/The Design and Construction of Modern Build Tools.png
--------------------------------------------------------------------------------
/articles/english/2017/Use Kotlin with npm, webpack and react.kts:
--------------------------------------------------------------------------------
1 |
2 |
3 | import link.kotlin.scripts.Article
4 | import link.kotlin.scripts.LanguageCodes.EN
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | With Kotlin 1.1, targeting JavaScript in the Kotlin compiler has officially reached production-ready status. Of course, having compiler support is not enough to be able to solve real-life problems, so we continue our work on integrating Kotlin into the larger JavaScript ecosystem.
11 |
12 | Today, we’d like to present two new projects: a Gradle plugin integrating Kotlin with npm, webpack and karma, and a full-stack application sample with a Kotlin/JVM backend and a Kotlin/JS frontend built with React.
13 |
14 | ## Kotlin Frontend Plugin
15 |
16 | The [Kotlin frontend plugin](https://github.com/Kotlin/kotlin-frontend-plugin) allows you to build and deploy a Kotlin frontend application using webpack. You can use npm packages as dependencies of your application, and the plugin will take care of downloading them and bundling them into the resulting JS file. The plugin also integrates with Karma, allowing you to run the tests of your application. And for optimal workflow, the plugin supports continuous compilation and hot reload, ensuring that you always see an up-to-date version of your application in the browser.
17 |
18 | The [README](https://github.com/Kotlin/kotlin-frontend-plugin/blob/master/README.md) file gives instructions for using the plugin, and the examples directory contains a [simple example](https://github.com/Kotlin/kotlin-frontend-plugin/tree/master/examples/frontend-only) showing how you can apply it in a real project.
19 |
20 | ## Kotlin React Example
21 |
22 | [Thinkter](https://github.com/Kotlin/kotlin-fullstack-sample) is an example of a modern full-stack application built in Kotlin. The backend runs under Jetty and uses [Ktor](https://github.com/kotlin/ktor), a Kotlin Web application framework developed by the Kotlin team. The frontend uses React; a set of React wrappers for Kotlin is [provided as part of the project](https://github.com/Kotlin/kotlin-fullstack-sample/tree/master/frontend/src/org/jetbrains/react). You’re welcome to use the wrappers in your project and adapt them to your own needs. Note that we’re working on evolving the React wrappers internally, and we’re considering releasing them as a separate open-source library.
23 |
24 | To see what Kotlin React code looks like, you can check out [one of the components](https://github.com/Kotlin/kotlin-fullstack-sample/blob/master/frontend/src/org/jetbrains/demo/thinkter/NewThoughtComponent.kt) of the application.
25 |
26 | Your feedback on these releases is very much welcome! Please file issues on GitHub, stop by the [forums](https://discuss.kotlinlang.org/), or join the #javascript channel on the [Kotlin Slack](http://slack.kotlinlang.org/).
27 | """
28 |
29 | Article(
30 | title = "Use Kotlin with npm, webpack and react",
31 | url = "https://blog.jetbrains.com/kotlin/2017/04/use-kotlin-with-npm-webpack-and-react/",
32 | categories = listOf(
33 | "Kotlin"
34 | ),
35 | type = article,
36 | lang = EN,
37 | author = "Dmitry Jemerov",
38 | date = LocalDate.of(2017, 4, 18),
39 | body = body
40 | )
41 |
--------------------------------------------------------------------------------
/articles/english/2017/Why I prefer Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.EN
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | I've been an enterprise Java developer for a little over 10 years, and I've been using Java for just over 16 years - back when Java 1.3 was the latest and greatest. It's been a long ride. Back then there were no Lambdas, no Streams, no Generics, no Annotations. There wasn't even an `assert` keyword.
10 |
11 | These days, Java has a huge amount for a very vast and powerful ecosystem. And one of the most powerful parts of all of that is the built in support for alternative languages as part of the same system. The JVM makes it possible to have many different languages - meaning the actual code you type into the editor - compile down to compatible bytecode and all run together in the same application. That's a huge benefit for software development, since you can now write different parts of the application in the best suited language for the job.
12 |
13 | So what exactly is Kotlin, and why do I like it so much? Unlike many of of the other JVM languages, Kotlin doesn't try to be anything special or different. It simply exists as a vastly simplified, streamlined Java language. There is very little, if anything, that Java can do that Kotlin can't do. The difference is that Kotlin does the same in significantly less code, making it significantly easier to read and maintain. Kotlin also has a large emphasis on Java Interop, meaning that it's trivial to use it in conjunction with existing Java libraries. Some other JVM languages make this much harder to achieve, if it's possible at all.
14 |
15 | So, in general, my experience so far is that Kotlin allows me to do everything that Java does, but simpler.
16 |
17 | The only thing that I've struggled with at all was some of the tooling - but this really doesn't bother me that much. By this, I'm talking Code Coverage (The JVM bytecode includes many lines that just don't exist in the Kotlin code, so covering them is less easy), FindBugs, PMD, Checkstyle, and so on. I've not explored Sonar for Kotlin yet, but it's very likely that this will fill in many of the gaps if it works.
18 |
19 | """
20 |
21 | Article(
22 | title = "Why I prefer Kotlin",
23 | url = "https://dev.to/grahamcox82/why-i-prefer-kotlin",
24 | categories = listOf(
25 | "Kotlin"
26 | ),
27 | type = article,
28 | lang = EN,
29 | author = "Graham Cox",
30 | date = LocalDate.of(2017, 1, 2),
31 | body = body
32 | )
33 |
--------------------------------------------------------------------------------
/articles/hebrew/Taking Kotlin to production, Seriously.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.HE
4 | import link.kotlin.scripts.LinkType.video
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Next Insurance was founded in the beginning of 2016 and first lines of our production code started accumulating in May 2016. In the beginning I have started writing in Java and experimenting with Kotlin, which saw its 1.0 release two months earlier. 6 months later, the development of our backend services has totally shifted to Kotlin. We still keep a few classes in Java just to make sure that the integration remains seamless but the vast majority of our codebase is written in Kotlin. In this talk I will cover the language features and why I think it is awesome, from null safety to smart casts and data classes. We will also look into the future with 1.1 async/await feature and more.
10 |
11 | Haim Yadid is leading backend development in Next insurance. Developing in Java in the last 13 years most of the time focusing on performance optimization and GC tuning.
12 |
13 |
14 | """
15 |
16 | Article(
17 | title = "Taking Kotlin to production, Seriously",
18 | url = "https://www.youtube.com/watch?v=qSFch-3ULAw",
19 | categories = listOf(
20 | "Kotlin"
21 | ),
22 | type = video,
23 | lang = HE,
24 | author = "Haim Yadid",
25 | date = LocalDate.of(2016, 12, 9),
26 | body = body
27 | )
28 |
--------------------------------------------------------------------------------
/articles/italian/Costruiamo un treno in Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.IT
4 | import link.kotlin.scripts.LinkType.video
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Dopo cinque anni di sviluppo JetBrains rilascia la prima versione di Kotlin, linguaggio staticamente tipizzato che pur rimanendo pienamente compatibile con Java cerca di risolverne alcuni problemi tutt'ora aperti. Presenterò un semplice programma realizzato con approccio OO/funzionale e confronteremo l'implementazione Java 8 con quella Kotlin.
10 |
11 | Francesco Vasco: Lavoro da 16 anni in varie realtà utilizzando prevalentemente tecnologie in ambito Java e da febbraio ho iniziato ad utilizzare Kotlin sia in campo amatoriale che professionale.
12 |
13 | [JUG Milano meeting #86](http://www.jugmilano.it/meeting-86.html)
14 |
15 |
16 | """
17 |
18 | Article(
19 | title = "Costruiamo un treno in Kotlin",
20 | url = "https://www.youtube.com/watch?v=y-T6DCtNUG0",
21 | categories = listOf(
22 | "Kotlin"
23 | ),
24 | type = video,
25 | lang = IT,
26 | author = "Francesco Vasco",
27 | date = LocalDate.of(2016, 12, 19),
28 | body = body
29 | )
30 |
31 |
--------------------------------------------------------------------------------
/articles/migration.js:
--------------------------------------------------------------------------------
1 | const fm = require('front-matter');
2 | const fs = require('fs');
3 | const moment = require('moment');
4 |
5 | const parseDate = date => moment(date, 'MMM DD, YYYY hh:mm');
6 |
7 | const folder = './articles/english/2016/';
8 |
9 | const articlesDir = fs.readdirSync(folder);
10 |
11 | articlesDir
12 | .filter(article => article.endsWith(".md"))
13 | .forEach(it => {
14 | fs.unlinkSync(`${folder}${it}`);
15 | });
16 |
17 | articlesDir
18 | .filter(article => article.endsWith(".md"))
19 | .map(article => {
20 | const content = fs.readFileSync(`${folder}${article}`, {encoding: 'UTF-8'});
21 | const data = fm(content);
22 |
23 | data.file = article;
24 |
25 | data.kts = getScript(data);
26 |
27 | return data;
28 | })
29 | .forEach(it => {
30 | fs.writeFileSync(`${folder}${it.file.replace(".md", ".kts")}`, it.kts, {encoding: 'UTF-8'});
31 | });
32 |
33 |
34 | function getCategories(list) {
35 | return list.map(it => `"${it}"`).join(",\n ")
36 | }
37 |
38 | function getScript(article) {
39 | const attr = article.attributes;
40 |
41 | return `
42 | import link.kotlin.scripts.Article
43 | import link.kotlin.scripts.LinkType.*
44 | import link.kotlin.scripts.LanguageCodes.*
45 | import java.time.LocalDate
46 |
47 | // language=Markdown
48 | val body = """
49 | ${article.body}
50 | """
51 |
52 | Article(
53 | title = "${attr.title}",
54 | url = "${attr.url}",
55 | categories = listOf(
56 | ${getCategories(attr.categories)}
57 | ),
58 | type = ${attr.type || "article"},
59 | lang = EN,
60 | author = "${attr.author}",
61 | date = LocalDate.of(${parseDate(attr.date).format("YYYY, M, D")}),
62 | body = body
63 | )
64 | `;
65 | }
66 |
--------------------------------------------------------------------------------
/articles/russian/DevZen Podcast Kotlin и Vulkan 1.0 - Episode 0080.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.Enclosure
4 | import link.kotlin.scripts.LanguageCodes.RU
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | Темы выпуска: Сравнение разных конфигурации сети в Kubernetes, Kotlin наконец вышел в версии 1.0, Vulkan тоже вышел в 1.0, критическая уязвимость в glibc, ZFS в Ubuntu 16.04, снова Rust, и про Монады. И, конечно, ответы на вопросы слушателей.
11 |
12 | Шоу нотес:
13 |
14 | * Вакансия C++ & Scala Software Engineer
15 | * Comparison of Networking Solutions for Kubernetes — Comparison of Networking Solutions for Kubernetes 2 documentation
16 | * [Kotlin 1.0 Released: Pragmatic Language for JVM and Android | Kotlin Blog](http://blog.jetbrains.com/kotlin/2016/02/kotlin-1-0-released-pragmatic-language-for-jvm-and-android/)
17 | * Go 1.6 is released — The Go Blog
18 | * Does FreeBSD support OpenGL 3.3?
19 | * Unable to build Assimp on FreeBSD 10.2 · Issue #795 · assimp/assimp · GitHub
20 | * Vulkan — Industry Forged
21 | * Vulkan in 30 minutes
22 | * OpenNews: Опубликован графический стандарт Vulkan 1.0
23 | * Khronos Products
24 | * Vulkan 1.0 Released: What You Need To Know About This Cross-Platform, High-Performance Graphics API — Phoronix
25 | * PVS-Studio покопался в ядре FreeBSD
26 | * Критическая уязвимость библиотеки glibc позволяет осуществлять удаленное выполнение кода / Блог компании Positive Technologies / Хабрахабр
27 | * FreeBSD and CVE-2015-7547
28 | * OpenNews: В Ubuntu 16.04 будет добавлена поддержка ZFS и Vulkan
29 | * From the Canyon Edge: ZFS is *the* FS for Containers in Ubuntu 16.04!
30 | * There is No Now — ACM Queue
31 | * select * from depesz; » Blog Archive » Waiting for 9.6 – Remove GROUP BY columns that are functionally dependent on other columns.
32 | * Hint Bits — PostgreSQL wiki
33 | * Speeding up things with hint bits — Cybertec — The PostgreSQL Database Company
34 | * Introduction to Windows shellcode development – Part 3 – Security Café
35 | * The latest high-end Ubuntu phone will be available globally | ZDNet
36 | * CharybdeFS: a new fault-injecting filesystem for software testing
37 | * Red Book, 5th ed. Ch. 6: Weak Isolation and Distribution
38 | * PostgreSQL: Documentation: 9.5: Transaction Isolation
39 | * [Libevent-users] Comparison of libevent and libuv
40 | * Kazuho’s Weblog: The reasons I stopped using libuv for H2O
41 | * Using non-blocking and asynchronous I/O (CK10 problem) in Linux and Windows (with epool, iocp, libevent/libev/libuv/boost.asio and librt/libaio) | Rui’s Blog
42 | * Запах монад по утрам — Прогулки по воде
43 | * Темы и вопросы слушателей для 0080 « DevZen Podcast
44 |
45 | """
46 |
47 | Article(
48 | title = "DevZen Podcast: Kotlin и Vulkan 1.0 — Episode 0080.",
49 | url = "http://devzen.ru/episode-0080/",
50 | categories = listOf(
51 | "Podcast",
52 | "Kotlin"
53 | ),
54 | type = article,
55 | lang = RU,
56 | author = "DevZen Podcast",
57 | date = LocalDate.of(2016, 2, 20),
58 | body = body,
59 | enclosure = Enclosure(
60 | url = "http://devzen.ru/download/2016/devzen-0080-2016-02-19-3280e712a2cc1485.mp3",
61 | size = 55240704
62 | )
63 | )
64 |
--------------------------------------------------------------------------------
/articles/russian/Kotlin - Будущие изменения и текущие мифы.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.RU
4 | import link.kotlin.scripts.LinkType.video
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Kotlin очень хорошо зашёл в сообщество Android разработчиков, в то же время множество разработчиков всё так же опасаются попробовать использовать в production.
10 | В этом выпуске я пригласил Яна Жуланова, из компании Jetbrains, одного из разработчиков Kotlin, а именно специализирующемся на Kotlin для Android.
11 | Вместе мы обсудим почему вас стоит попробовать Kotlin, если вы его ещё не пробовали, обсудим популярные мифы и опасения о Kotlin и обсудим какие новости нам ожидают c Kotlin в ближайшем будущем.
12 |
13 | Упоминания:
14 |
15 | * Kotlin/anko: Pleasant Android application development – http://bit.ly/2hQvGsA
16 | * Scaloid makes your Android code easy to understand and maintain – http://bit.ly/2hDH8r5
17 | * XTend – Modernized Java – http://bit.ly/2hPCiF5
18 | * Используем Kotlin для написания скриптов Gradle – http://bit.ly/2ib9CFN
19 | * Why You Must Try Kotlin For Android Development? – http://bit.ly/2hQy8PW
20 | * Android Development with Kotlin — Jake Wharton – http://bit.ly/2h698mk
21 | * Advancing Android Development with Kotlin – Jake Wharton – http://bit.ly/2hPANa2
22 | * Kotlin 1.0.5 is here с улучшенной поддержкой Lint – http://bit.ly/2hPFAZj
23 | * Kotlin vs Java: Compilations speed – http://bit.ly/2h6eDBE
24 | * Kotlin 1.1: first glimpse – http://bit.ly/2gXP7LJ
25 | * Дмитрий Жемеров — Ой, котик побежал: Компиляция и производительность кода на Kotlin – http://bit.ly/2hPHnx8
26 | * Kotlin Native – http://bit.ly/2hPATOW
27 | * Kotlin Weekly – http://bit.ly/2hPDZ5D
28 | * Kotlin Slack – http://bit.ly/2hQww8I
29 | * Kotlin Youtrack – http://bit.ly/2hDPj6I
30 | * Kotlin Discussions – http://bit.ly/2h66tsU
31 |
32 |
33 |
34 | """
35 |
36 | Article(
37 | title = "Kotlin: Будущие изменения и текущие мифы",
38 | url = "https://www.youtube.com/watch?v=d6795d1aN3U",
39 | categories = listOf(
40 | "Kotlin",
41 | "Android"
42 | ),
43 | type = video,
44 | lang = RU,
45 | author = "Android в Лицах",
46 | date = LocalDate.of(2016, 12, 20),
47 | body = body
48 | )
49 |
--------------------------------------------------------------------------------
/articles/russian/Kotlin для начинающих.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.RU
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 | Уже не мало нашумел Kotlin в мире программирования, не мало профессиональных инженеров уже обратил на него внимание, но также есть и те кому он не симпатизирует.
10 |
11 | 
12 |
13 | В данном топике я бы хотел обратить внимание тех начинающих программистов которые возможно только делают свой выбор языка программирования, которому бы хотели посвятить свою жизнь так сказать.
14 |
15 | Я сам Java Developer и для меня наступил тот период я когда хотелось посмотреть на другие языки, взять какие-то практики для себя с них.
16 |
17 | И однажды примерно в 2013 году я услышал что та прекрасная компания делающая такие крутые продукты как **Intellij IDEA**, **Youtrack** а именно [JetBrains](https://www.jetbrains.com/), анонсировала о новом языке [Kotlin](https://kotlinlang.org/), который на то время был в активной стадии разработки.
18 |
19 | И в этом году а именно 15 февраля 2016 года был выпушен релиз **Kotlin 1.0**. С этого момента я начал уже более активней его изучать и пытаться применять в небольших свои проектах.
20 |
21 | ## Kotlin для начинающих
22 |
23 | И этим постом я бы хотел поделится серией видео в которой я начал делится всем тем что я изучил за это время касаемо Kotlin.
24 |
25 | **Урок 0. Введение и знакомство**
26 | https://www.youtube.com/watch?v=L9k_NdTaMeI
27 |
28 |
29 | **Урок 1. String Templates**
30 | https://www.youtube.com/watch?v=frw1DpNm_ms
31 |
32 | Пока планирую выкладывать два видео в неделю, весь список будет [тут](https://goo.gl/yegW0d).
33 | Спасибо за ваше внимание, и надеюсь, данная информация кому-то будет полезно!
34 |
35 | """
36 |
37 | Article(
38 | title = "Kotlin для начинающих",
39 | url = "https://habrahabr.ru/post/278277/",
40 | categories = listOf(
41 | "Kotlin"
42 | ),
43 | type = article,
44 | lang = RU,
45 | author = "@Devcolibri",
46 | date = LocalDate.of(2016, 3, 2),
47 | body = body
48 | )
49 |
--------------------------------------------------------------------------------
/articles/russian/Podcast Разбор Полетов Episode 102 - Kotlin, тесты и здоровый сон.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.Enclosure
4 | import link.kotlin.scripts.LanguageCodes.RU
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 |
11 | ## Мероприятия
12 |
13 | 1. http://jbreak.ru/
14 | 1. https://fosdem.org/2016/
15 |
16 | ## Темки
17 |
18 | 1. Kotlin 1.0 RC - Философия Kotlin
19 | 1. JavaTest, TCK, JTreg и его связь с TestNG/JUnit и прочие вопросы в знатоку по этим вопросам
20 | 1. Что нужно есть и сколько нужно спать, что бы быть белым русским мужчиной в Америке
21 |
22 | ## Полезняшки
23 |
24 | 1. Клиент для Redis - [Medis](https://github.com/luin/medis)
25 | 1. http://kotlin.link/
26 | 1. https://github.com/Originate/git-town
27 | 1. https://libraries.io/
28 |
29 | """
30 |
31 | Article(
32 | title = "Podcast Разбор Полетов: Episode 102 — Kotlin, тесты и здоровый сон.",
33 | url = "http://razbor-poletov.com/2016/02/episode-102.html",
34 | categories = listOf(
35 | "Kotlin",
36 | "Podcast"
37 | ),
38 | type = article,
39 | lang = RU,
40 | author = "Dmitry Jemerov, Viktor Gamov, Alexey Abashev, Anton Arphipov, Dmitry Churbanov, Anton Arhipov",
41 | date = LocalDate.of(2016, 2, 4),
42 | body = body,
43 | enclosure = Enclosure(
44 | url = "http://traffic.libsyn.com/razborpoletov/razbor_102.mp3",
45 | size = 70319173
46 | )
47 | )
48 |
--------------------------------------------------------------------------------
/articles/russian/SDCast 41 в гостях Андрей Бреслав.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.Enclosure
4 | import link.kotlin.scripts.LanguageCodes.RU
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 |  Рад представить вам 41-й выпуск подкаста! Этот эпизод посвящен языку Kotlin, у меня в гостях Андрей Бреслав, руководитель проекта Kotlin в компании JetBrains.
11 |
12 | В начале выпуска мы поговорили о том, зачем вообще нужен еще один язык, Андрей рассказал про историю и предпосылки появления Kotlin, как все начиналось и развивалось.
13 |
14 | Обсудили так же общие теоретические аспекты разработки языков программирования: чем разработка языка отличается от разработки каких-либо других программных продуктов, какие компоненты являются основой для построения языка, на какие аспекты следует обращать особое внимание и как правильно заложить архитектуру.
15 |
16 | Так же Андрей рассказал, почему в качестве платформы была выбрана JVM, рассказал некоторые технические подробности реализации проекта. Подробно рассказал про interop с Java, о том, как можно начать использовать Kotlin в уже существующем проекте на Java сейчас, и как они у себя, в компании JetBrains уже начали это делать.
17 |
18 | Не обошли мы сторой и социальную составляющую проекта. Код языка Kotlin выложен в open source на github. Андрей рассказал про сообщество, которое сформировалось вокруг проекта, и как они с ним взаимодействуют, обсуждают запросы на новый функционал, баг-репорты и все прочее.
19 |
20 | В завершение выпуска, Андрей поделился планами по развитию языка как в ближайшем будущем, так и в долгосрочной перспективе.
21 |
22 | Ссылки на ресурсы по темам выпуска:
23 |
24 | * Андрей в соц сетях:
25 | * [Twitter](https://twitter.com/abreslav)
26 | * [Facebook](https://fb.com/abreslav)
27 | * [ВКонтакте](https://vk.com/abreslav)
28 | * [LinkedIn](https://www.linkedin.com/in/abreslav)
29 | * [Основной сайт проекта kotlinlang.org](https://kotlinlang.org/)
30 | * [Репозиторий на github](https://github.com/JetBrains/kotlin)
31 | * [Пост в блоге проекта о релизе 1.0](http://blog.jetbrains.com/kotlin/2016/02/kotlin-1-0-released-pragmatic-language-for-jvm-and-android/)
32 | * Несколько видео докладов про Kotlin Андрея Бреслава и Дмитрия Жемерова:
33 | * [Что такое Kotlin? Введение](https://www.youtube.com/watch?v=HWyd1gYMkl0)
34 | * [Kotlin: самое сложное — совместимость](https://www.youtube.com/watch?v=LWFx4QWrTyo)
35 | * [Kotlin для Android: коротко и ясно](https://www.youtube.com/watch?v=VU_L2_XGQ9s)
36 | * [Kotlin: сессия вопросов и ответов со встречи JUG.ru 04.03.2016](https://www.youtube.com/watch?v=YOmdOTlhZa8)
37 |
38 |
39 | """
40 |
41 | Article(
42 | title = "SDCast #41: в гостях Андрей Бреслав, руководитель проекта Kotlin в компании JetBrains",
43 | url = "https://sdcast.ksdaemon.ru/2016/03/sdcast-41/",
44 | categories = listOf(
45 | "Kotlin",
46 | "Podcast"
47 | ),
48 | type = article,
49 | lang = RU,
50 | author = "Андрей Бреслав, Константин Буркалев",
51 | date = LocalDate.of(2016, 3, 11),
52 | body = body,
53 | enclosure = Enclosure(
54 | url = "https://sdcast.ksdaemon.ru/podlove/file/159/s/download/SDCast-41.ogg",
55 | size = 22683272
56 | )
57 | )
58 |
--------------------------------------------------------------------------------
/articles/russian/Беглый взгляд на Async-Await в Android.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes
4 | import link.kotlin.scripts.LanguageCodes.RU
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 |
11 | """
12 |
13 | Article(
14 | title = "Беглый взгляд на Async-Await в Android",
15 | url = "https://habrahabr.ru/post/314574/",
16 | categories = listOf(
17 | "Kotlin",
18 | "Android"
19 | ),
20 | type = article,
21 | lang = RU,
22 | author = "Макс Ровкин",
23 | date = LocalDate.of(2016, 11, 8),
24 | body = body
25 | )
26 |
--------------------------------------------------------------------------------
/articles/russian/Видео со встречи JUG.ru с разработчиками Kotlin.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.RU
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | ## Часть 1. Введение
11 | Андрей Бреслав расскажет про то, что такое Kotlin, как у него сейчас дела и т.д.
12 | [Андрей Бреслав — Что такое Kotlin Введение](https://www.youtube.com/watch?v=HWyd1gYMkl0)
13 |
14 | ## Часть 2. К релизу и далее
15 | Начиная с версии 1.0, Kotlin предоставляет гарантии обратной совместимости с существующим кодом. Дмитрий Жемеров расскажет о том, что в точности они обещают на будущее, о том, как это обещание повлияло на дизайн языка, и о том, под какие направления будущего развития уже есть заготовки в версии 1.0.
16 | [Дмитрий Жемеров, JetBrains — Kotlin - к релизу и далее](https://www.youtube.com/watch?v=m5T0M7SnCC0)
17 |
18 | ## Часть 3. Самое сложное — совместимость
19 | [Андрей Бреслав — Kotlin - самое сложное — совместимость](https://www.youtube.com/watch?v=LWFx4QWrTyo)
20 | Андрей Бреслав расскажет о том, как они боролись за прозрачную совместимость: чтобы Kotlin и Java могли дружно обитать в одном проекте. Для этого пришлось придумать немало оригинальных решений и пойти на многие компромиссы на всех уровнях: от системы типов до плагинов к билд-системам.
21 |
22 | ## Часть 4. Сессия вопросов и ответов
23 | [Андрей Бреслав и Дмитрий Жемеров — Kotlin - сессия вопросов и ответов](https://www.youtube.com/watch?v=YOmdOTlhZa8)
24 | Андрей, Дмитрий и другие разработчики Kotlin с удовольствием ответят на ваши вопросы.
25 |
26 | """
27 |
28 | Article(
29 | title = "Видео со встречи JUG.ru с разработчиками Kotlin",
30 | url = "https://github.com/KotlinBy/awesome-kotlin/blob/master/app/rss/articles/%5BRU%5D%20%D0%92%D0%B8%D0%B4%D0%B5%D0%BE%20%D1%81%D0%BE%20%D0%B2%D1%81%D1%82%D1%80%D0%B5%D1%87%D0%B8%20JUG.ru%20%D1%81%20%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%87%D0%B8%D0%BA%D0%B0%D0%BC%D0%B8%20Kotlin.md",
31 | categories = listOf(
32 | "Kotlin",
33 | "Video"
34 | ),
35 | type = article,
36 | lang = RU,
37 | author = "JetBrains",
38 | date = LocalDate.of(2016, 3, 4),
39 | body = body
40 | )
41 |
--------------------------------------------------------------------------------
/articles/russian/Дмитрий Полищук - Kotlin + Android практический ликбез.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.RU
4 | import link.kotlin.scripts.LinkType.video
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 |
11 |
12 | """
13 |
14 | Article(
15 | title = "Дмитрий Полищук - Kotlin + Android: практический ликбез",
16 | url = "https://www.youtube.com/watch?v=2oVpnArCdWI",
17 | categories = listOf(
18 | "Kotlin",
19 | "Android"
20 | ),
21 | type = video,
22 | lang = RU,
23 | author = "Дмитрий Полищук",
24 | date = LocalDate.of(2016, 3, 9),
25 | body = body
26 | )
27 |
--------------------------------------------------------------------------------
/articles/russian/Погружение в Async-Await в Android.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.LanguageCodes.RU
4 | import link.kotlin.scripts.LinkType.article
5 | import java.time.LocalDate
6 |
7 | // language=Markdown
8 | val body = """
9 |
10 | """
11 |
12 | Article(
13 | title = "Погружение в Async-Await в Android",
14 | url = "https://habrahabr.ru/post/314656/",
15 | categories = listOf(
16 | "Kotlin",
17 | "Android"
18 | ),
19 | type = article,
20 | lang = RU,
21 | author = "Макс Ровкин",
22 | date = LocalDate.of(2016, 11, 9),
23 | body = body
24 | )
25 |
--------------------------------------------------------------------------------
/articles/russian/Радио-Т 484.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.Article
3 | import link.kotlin.scripts.Enclosure
4 | import link.kotlin.scripts.LanguageCodes.RU
5 | import link.kotlin.scripts.LinkType.article
6 | import java.time.LocalDate
7 |
8 | // language=Markdown
9 | val body = """
10 | * [Kotlin дорос до версии 1.0](http://thenextweb.com/dd/2016/02/15/kotlin-the-pragmatic-language-for-android-and-jvm-has-reached-its-1-0-release/) - 00:02:45.
11 | * [В чем его прагматизм](https://dzone.com/articles/kotlin-10-is-now-available) - 00:12:57.
12 | * Версия 3 iTerm2 - 00:42:04.
13 | * Странная история борьбы Apple - 00:52:37.
14 | * GitHub добавил поддержку шаблонов - 01:10:35.
15 | * Go 1.6 - 01:15:12.
16 | * Страшный баг угрожает нашим серверам - 01:21:21.
17 | * Архитектура Stack Overflow на 2016 - 01:26:33.
18 | * Custom Machine Types - конфигурации по вкусу - 01:31:15.
19 | * Темы наших слушателей
20 |
21 | """
22 |
23 | Article(
24 | title = "Радио-Т 484",
25 | url = "https://radio-t.com/p/2016/02/20/podcast-484/",
26 | categories = listOf(
27 | "Podcast",
28 | "Kotlin"
29 | ),
30 | type = article,
31 | lang = RU,
32 | author = "Umputun, Bobuk, Gray, Ksenks",
33 | date = LocalDate.of(2016, 2, 20),
34 | body = body,
35 | enclosure = Enclosure(
36 | url = "http://cdn.radio-t.com/rt_podcast484.mp3",
37 | size = 72259834
38 | )
39 | )
40 |
--------------------------------------------------------------------------------
/awesome-kotlin.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2 | import org.gradle.api.Project
3 | import org.gradle.api.plugins.ApplicationPluginConvention
4 | import org.gradle.api.tasks.JavaExec
5 | import org.gradle.api.tasks.wrapper.Wrapper
6 | import org.gradle.script.lang.kotlin.compile
7 | import org.gradle.script.lang.kotlin.configure
8 | import org.gradle.script.lang.kotlin.dependencies
9 | import org.gradle.script.lang.kotlin.repositories
10 | import org.gradle.script.lang.kotlin.task
11 | import org.gradle.script.lang.kotlin.testCompile
12 | import org.jetbrains.kotlin.gradle.dsl.Coroutines
13 | import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
14 |
15 | buildscript {
16 | repositories {
17 | jcenter()
18 | maven {
19 | setUrl("https://dl.bintray.com/kotlin/kotlin-eap-1.1/")
20 | }
21 | }
22 |
23 | dependencies {
24 | classpath("com.github.jengelman.gradle.plugins:shadow:1.2.4")
25 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-eap-77")
26 | }
27 | }
28 |
29 | apply {
30 | plugin("kotlin")
31 | plugin("application")
32 | plugin("com.github.johnrengelman.shadow")
33 | }
34 |
35 | configure {
36 | mainClassName = "link.kotlin.scripts.Application"
37 | }
38 |
39 | configure("run") {
40 | args(System.getProperty("travis", "false"))
41 | }
42 |
43 | configure("shadowJar") {
44 | mergeServiceFiles()
45 | }
46 |
47 | repositories {
48 | jcenter()
49 | maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap-1.1/") }
50 | maven { setUrl("https://dl.bintray.com/heapy/heap") }
51 | }
52 |
53 | configure {
54 | experimental.coroutines = Coroutines.ENABLE
55 | }
56 |
57 | dependencies {
58 | compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.2-eap-77")
59 | compile("org.jetbrains.kotlin:kotlin-reflect:1.1.2-eap-77")
60 | compile("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:0.14.1")
61 |
62 | compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.8.8")
63 | compile("org.slf4j:slf4j-simple:1.7.25")
64 |
65 | compile("com.rometools:rome:1.7.0")
66 | compile("com.github.dfabulich:sitemapgen4j:1.0.6")
67 | compile("org.jsoup:jsoup:1.10.2")
68 | compile("by.heap.remark:remark-kotlin:1.2.0")
69 |
70 | compile("org.jetbrains.kotlin:kotlin-script-util:1.1.2-eap-77")
71 | compile("com.atlassian.commonmark:commonmark:0.9.0")
72 | compile("com.atlassian.commonmark:commonmark-ext-gfm-tables:0.9.0")
73 |
74 | compile("com.squareup.okhttp3:okhttp:3.5.0")
75 |
76 | testCompile("junit:junit:4.12")
77 | }
78 |
79 | task(name = "wrapper", type = Wrapper::class) {
80 | gradleVersion = "3.5"
81 | distributionUrl = "http://services.gradle.org/distributions/gradle-$gradleVersion-bin.zip"
82 | }
83 |
84 | inline fun Project.configure(name: String, configuration: C.() -> Unit) {
85 | (this.tasks.getByName(name) as C).configuration()
86 | }
87 |
--------------------------------------------------------------------------------
/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e # exit with nonzero exit code if anything fails
3 |
4 | # check current branch
5 | if [ 'master' != $TRAVIS_BRANCH ]; then
6 | echo "Deploy only on master branch. Current branch: '$branch'.";
7 | exit 0;
8 | fi
9 |
10 | # clear and re-create the dist directory
11 | rm -rf dist || exit 0;
12 |
13 | # Run kotlin application to generate various data
14 | echo $JAVA_HOME
15 | java -version
16 | ./gradlew --console plain --no-daemon --stacktrace run -Dtravis=true
17 | # Build React Application
18 | npm run pack
19 |
20 | # sync with remote folder
21 | rsync -r --delete-after --quiet $TRAVIS_BUILD_DIR/dist/ deploy@kotlin.link:~/files/kotlin.link
22 |
--------------------------------------------------------------------------------
/deploy@morty.enc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tibbi/awesome-kotlin/14ffb188025297d56d7ce9d1f287555e0913d7f1/deploy@morty.enc
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tibbi/awesome-kotlin/14ffb188025297d56d7ce9d1f287555e0913d7f1/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Apr 20 21:48:30 MSK 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=http\://services.gradle.org/distributions/gradle-3.5-bin.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/links/JavaScript.kts:
--------------------------------------------------------------------------------
1 | import link.kotlin.scripts.LinkType.github
2 | import link.kotlin.scripts.Tags
3 | import link.kotlin.scripts.category
4 | import link.kotlin.scripts.link
5 | import link.kotlin.scripts.subcategory
6 |
7 | category("Kotlin JavaScript") {
8 | subcategory("JavaScript") {
9 | link {
10 | name = "andrewoma/reakt"
11 | desc = "Reakt is a Kotlin wrapper for facebook's React library."
12 | href = "https://github.com/andrewoma/reakt"
13 | type = github
14 | tags = Tags["react", "javascript", "ui"]
15 | }
16 | link {
17 | name = "pixijs/pixi-native"
18 | desc = "The aim of this project is to provide a fast lightweight 2D library that works across all devices."
19 | href = "https://github.com/pixijs/pixi-native"
20 | type = github
21 | tags = Tags["javascript", "2d", "canvas", "WebGL"]
22 | }
23 | link {
24 | name = "shafirov/klogging"
25 | desc = "Kotlin logging, both js and jvm."
26 | href = "https://github.com/shafirov/klogging"
27 | type = github
28 | tags = Tags["javascript", "logging"]
29 | }
30 | link {
31 | name = "stangls/kotlin-js-jquery"
32 | desc = "A small framework for writing client -side web -applications in Kotlin."
33 | href = "https://github.com/stangls/kotlin-js-jquery"
34 | type = github
35 | tags = Tags["javascript", "jquery"]
36 | }
37 | link {
38 | name = "Kotlin/kotlin-fullstack-sample"
39 | desc = "Kotlin Full-stack Application Example."
40 | href = "https://github.com/Kotlin/kotlin-fullstack-sample"
41 | type = github
42 | tags = Tags["fullstack", "javascript", "web", "ktor"]
43 | }
44 | link {
45 | name = "danfma/kodando"
46 | desc = "Kotlin JS bindings and libraries."
47 | href = "https://github.com/danfma/kodando"
48 | type = github
49 | tags = Tags["bindings", "react", "mobx", "rxjs"]
50 | }
51 | }
52 | subcategory("Frontend") {
53 | link {
54 | name = "olegcherr/Aza-Kotlin-CSS"
55 | desc = "Kotlin DSL for CSS"
56 | href = "https://github.com/olegcherr/Aza-Kotlin-CSS"
57 | type = github
58 | tags = Tags["web", "css"]
59 | }
60 | }
61 | subcategory("Game Development") {
62 | link {
63 | name = "perses-games/kudens"
64 | desc = "Develop browser games in Kotlin"
65 | href = "https://github.com/perses-games/kudens"
66 | type = github
67 | tags = Tags["games", "game dev", "javascript"]
68 | }
69 | }
70 | subcategory("Build Tools") {
71 | link {
72 | name = "Kotlin/kotlin-frontend-plugin"
73 | desc = "Gradle Kotlin plugin for frontend development."
74 | href = "https://github.com/Kotlin/kotlin-frontend-plugin"
75 | type = github
76 | tags = Tags["webpack", "npm", "gradle", "karma", "javascript"]
77 | }
78 | link {
79 | name = "huston007/kotlin-loader"
80 | desc = "Kotlin webpack loader."
81 | href = "https://github.com/huston007/kotlin-loader"
82 | type = github
83 | tags = Tags["webpack", "javascript"]
84 | }
85 | }
86 | subcategory("Integration") {
87 | link {
88 | name = "kotlin/ts2kt"
89 | desc = "Converter of TypeScript definition files to Kotlin declarations (stubs)."
90 | href = "https://github.com/kotlin/ts2kt"
91 | type = github
92 | tags = Tags["javascript", "typescript"]
93 | }
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/links/Native.kts:
--------------------------------------------------------------------------------
1 |
2 | import link.kotlin.scripts.LinkType.github
3 | import link.kotlin.scripts.Tags
4 | import link.kotlin.scripts.category
5 | import link.kotlin.scripts.link
6 | import link.kotlin.scripts.subcategory
7 |
8 | category("Kotlin Native") {
9 | subcategory("Projects") {
10 | link {
11 | name = "JetBrains/kotlin-native"
12 | desc = "Kotlin/Native is a LLVM backend for the Kotlin compiler, runtime implementation and native code generation facility using LLVM toolchain."
13 | href = "https://github.com/JetBrains/kotlin-native"
14 | type = github
15 | tags = Tags["native", "macos", "linux", "llvm"]
16 | }
17 | link {
18 | name = "perses-games/konan-sfml"
19 | desc = "Kotlin native with SFML example"
20 | href = "https://github.com/perses-games/konan-sfml"
21 | type = github
22 | tags = Tags["sfml", "linux", "native"]
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "awesome-kotlin",
3 | "version": "1.0.0",
4 | "description": "Awesome list for Kotlin",
5 | "main": "index.js",
6 | "dependencies": {
7 | "babel-polyfill": "6.23.0",
8 | "normalize.css": "4.2.0",
9 | "react": "15.5.4",
10 | "react-dom": "15.5.4",
11 | "react-router": "3.0.0"
12 | },
13 | "devDependencies": {
14 | "@types/history": "^2.0.39",
15 | "@types/node": "^6.0.46",
16 | "@types/react": "^15.0.21",
17 | "@types/react-dom": "^0.14.23",
18 | "@types/react-router": "3",
19 | "autoprefixer": "6.7.7",
20 | "css-loader": "0.28.0",
21 | "file-loader": "^0.11.1",
22 | "html-webpack-plugin": "2.28.0",
23 | "less": "2.7.2",
24 | "less-loader": "4.0.3",
25 | "postcss-loader": "1.3.3",
26 | "style-loader": "0.16.1",
27 | "ts-loader": "2.0.3",
28 | "typescript": "^2.2.2",
29 | "url-loader": "0.5.8",
30 | "webpack": "2.4.1",
31 | "webpack-dev-server": "2.4.3"
32 | },
33 | "scripts": {
34 | "prestart": "yarn install",
35 | "start": "webpack-dev-server",
36 | "pack": "webpack -p --env.NODE_ENV production --env.SOURCE_MAP source-map"
37 | },
38 | "repository": {
39 | "type": "git",
40 | "url": "git+https://github.com/KotlinBy/awesome-kotlin.git"
41 | },
42 | "keywords": [
43 | "kotlin"
44 | ],
45 | "author": "Ibragimov Ruslan, Labushkina Hanna",
46 | "license": "ISC",
47 | "bugs": {
48 | "url": "https://github.com/KotlinBy/awesome-kotlin/issues"
49 | },
50 | "homepage": "https://github.com/KotlinBy/awesome-kotlin#readme"
51 | }
52 |
--------------------------------------------------------------------------------
/pages/github.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | github.com style (c) Vasily Polovnyov
4 |
5 | */
6 |
7 | .hljs {
8 | display: block;
9 | overflow-x: auto;
10 | padding: 0.5em;
11 | color: #333;
12 | background: #f8f8f8;
13 | }
14 |
15 | .hljs-comment,
16 | .hljs-quote {
17 | color: #998;
18 | font-style: italic;
19 | }
20 |
21 | .hljs-keyword,
22 | .hljs-selector-tag,
23 | .hljs-subst {
24 | color: #333;
25 | font-weight: bold;
26 | }
27 |
28 | .hljs-number,
29 | .hljs-literal,
30 | .hljs-variable,
31 | .hljs-template-variable,
32 | .hljs-tag .hljs-attr {
33 | color: #008080;
34 | }
35 |
36 | .hljs-string,
37 | .hljs-doctag {
38 | color: #d14;
39 | }
40 |
41 | .hljs-title,
42 | .hljs-section,
43 | .hljs-selector-id {
44 | color: #900;
45 | font-weight: bold;
46 | }
47 |
48 | .hljs-subst {
49 | font-weight: normal;
50 | }
51 |
52 | .hljs-type,
53 | .hljs-class .hljs-title {
54 | color: #458;
55 | font-weight: bold;
56 | }
57 |
58 | .hljs-tag,
59 | .hljs-name,
60 | .hljs-attribute {
61 | color: #000080;
62 | font-weight: normal;
63 | }
64 |
65 | .hljs-regexp,
66 | .hljs-link {
67 | color: #009926;
68 | }
69 |
70 | .hljs-symbol,
71 | .hljs-bullet {
72 | color: #990073;
73 | }
74 |
75 | .hljs-built_in,
76 | .hljs-builtin-name {
77 | color: #0086b3;
78 | }
79 |
80 | .hljs-meta {
81 | color: #999;
82 | font-weight: bold;
83 | }
84 |
85 | .hljs-deletion {
86 | background: #fdd;
87 | }
88 |
89 | .hljs-addition {
90 | background: #dfd;
91 | }
92 |
93 | .hljs-emphasis {
94 | font-style: italic;
95 | }
96 |
97 | .hljs-strong {
98 | font-weight: bold;
99 | }
100 |
--------------------------------------------------------------------------------
/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Sitemap: http://kotlin.link/sitemap.xml
3 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.buildFileName = 'build.gradle.kts'
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/ApplicationConfiguration.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | data class ApplicationConfiguration(
4 | val ghUser: String,
5 | val ghToken: String,
6 | val mercuryToken: String,
7 | val siteUrl: String = "https://kotlin.link/"
8 | )
9 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/Builder.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import link.kotlin.scripts.model.Link
4 |
5 | fun category(name: String, config: Category.() -> Unit): Category {
6 | return Category(name = name, subcategories = mutableListOf()).apply {
7 | config(this)
8 | }
9 | }
10 |
11 | fun Category.subcategory(name: String, config: Subcategory.() -> Unit) {
12 | val subcategory = Subcategory(name = name, links = mutableListOf())
13 | config(subcategory)
14 | this.subcategories.add(subcategory)
15 | }
16 |
17 | fun Subcategory.link(config: LinkBuilder.() -> Unit) {
18 | val linkBuilder = LinkBuilder()
19 | config(linkBuilder)
20 | this.links.add(linkBuilder.toLink())
21 | }
22 |
23 | class LinkBuilder {
24 | var name: String = ""
25 | var href: String = ""
26 | var desc: String? = null
27 | var type: LinkType = LinkType.none
28 | var tags: Array = arrayOf()
29 |
30 | var whitelisted: Boolean = false
31 | fun toLink(): Link {
32 | return Link(
33 | name = name,
34 | href = href,
35 | desc = desc ?: "",
36 | type = type,
37 | tags = tags,
38 | whitelisted = whitelisted
39 | )
40 | }
41 | }
42 |
43 | object Tags {
44 | inline operator fun get(vararg items: K) = arrayOf(*items)
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/Cache.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import com.fasterxml.jackson.databind.ObjectMapper
4 | import com.fasterxml.jackson.module.kotlin.readValue
5 | import java.io.InputStream
6 | import java.nio.file.Files.write
7 | import java.nio.file.Paths
8 | import java.nio.file.StandardOpenOption.CREATE
9 | import java.nio.file.StandardOpenOption.TRUNCATE_EXISTING
10 |
11 | class Cache(private val mapper: ObjectMapper) {
12 | private var cache = mutableMapOf()
13 |
14 | fun load(data: InputStream) {
15 | cache = mapper.readValue(data)
16 | }
17 |
18 | fun save() {
19 | val json = mapper.writeValueAsBytes(cache)
20 | write(Paths.get("./dist/cache.json"), json, CREATE, TRUNCATE_EXISTING)
21 | }
22 |
23 | fun put(key: String, data: Any) {
24 | cache.put(key, data)
25 | }
26 |
27 | @Suppress("UNCHECKED_CAST")
28 | fun get(key: String, default: T): T {
29 | return cache[key] as T? ?: default
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/CopyTask.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import java.nio.file.Files
4 | import java.nio.file.Paths
5 | import java.nio.file.StandardCopyOption.REPLACE_EXISTING
6 |
7 | class CopyTask {
8 | fun copy(mapping: Map) {
9 | mapping.forEach { (from, to) ->
10 | Files.copy(Paths.get(from), Paths.get(to), REPLACE_EXISTING)
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/DefaultStarsGenerator.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties
4 | import com.fasterxml.jackson.databind.ObjectMapper
5 | import com.fasterxml.jackson.module.kotlin.readValue
6 | import kotlinx.coroutines.experimental.future.await
7 | import kotlinx.coroutines.experimental.runBlocking
8 | import okhttp3.OkHttpClient
9 | import okhttp3.Request
10 | import okhttp3.Response
11 | import java.util.concurrent.CompletableFuture
12 |
13 | class DefaultStarsGenerator(
14 | val config: ApplicationConfiguration,
15 | val mapper: ObjectMapper,
16 | val okHttpClient: OkHttpClient
17 | ) {
18 | fun generate(allLinks: Links) = runBlocking {
19 | allLinks.forEach { category ->
20 | category.subcategories.forEach { subcategory ->
21 | subcategory.links.forEach { link ->
22 | when (link.type) {
23 | LinkType.github -> {
24 | // TODO: Do request async
25 | val response = getGithubStarCount(okHttpClient, link.name, config.ghUser, config.ghToken).await()
26 | val stars = mapper.readValue(response.body().string())
27 |
28 | link.star = stars.stargazers_count
29 | link.update = parseInstant(stars.pushed_at).format(formatter)
30 | }
31 | LinkType.bitbucket -> {
32 | // TODO: Do request async
33 | val response = getBitbucketStarCount(okHttpClient, link.name).await()
34 |
35 | val stars = mapper.readValue(response.body().string())
36 | link.star = stars.size
37 | }
38 | else -> Unit
39 | }
40 | }
41 | }
42 | }
43 |
44 | mapper.writeValueAsString(allLinks)
45 | }
46 | }
47 |
48 |
49 | private fun getGithubStarCount(client: OkHttpClient, name: String, user: String, pass: String): CompletableFuture {
50 | if (user == "" || pass == "") {
51 | throw RuntimeException("You should run this script only when you added GH_USER and GH_TOKEN to env." +
52 | "Token can be found here: https://github.com/settings/tokens")
53 | }
54 |
55 | val request = Request.Builder()
56 | .url("https://api.github.com/repos/$name")
57 | .header("User-Agent", "Awesome-Kotlin-List")
58 | .header("Authorization", "token $pass")
59 | .build()
60 |
61 | return client.newCall(request).async()
62 | }
63 |
64 | private fun getBitbucketStarCount(client: OkHttpClient, name: String):
65 | CompletableFuture {
66 | val request = Request.Builder()
67 | .url("https://api.bitbucket.org/2.0/repositories/$name/watchers")
68 | .header("User-Agent", "Awesome-Kotlin-List")
69 | .build()
70 |
71 | return client.newCall(request).async()
72 | }
73 |
74 | @JsonIgnoreProperties(ignoreUnknown = true)
75 | class GithubResponse(
76 | val stargazers_count: Int,
77 | val pushed_at: String
78 | )
79 |
80 | @JsonIgnoreProperties(ignoreUnknown = true)
81 | class BitbucketResponse(
82 | val size: Int
83 | )
84 |
85 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/GithubTrending.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import com.fasterxml.jackson.databind.ObjectMapper
4 | import org.jsoup.Jsoup
5 |
6 | private val trending = listOf(
7 | "https://github.com/trending/kotlin?since=weekly",
8 | "https://github.com/trending/kotlin?since=monthly",
9 | "https://github.com/trending/kotlin?since=daily"
10 | )
11 |
12 | class GithubTrending(val cache: Cache) {
13 | fun fetch(): List {
14 | return trending
15 | .map(this::getTrendingRepositories)
16 | .flatten()
17 | .distinct()
18 | }
19 |
20 | private fun getTrendingRepositories(url: String): List {
21 | val doc = Jsoup.connect(url).get()
22 |
23 | val isAvailable = doc.select(".blankslate").isEmpty()
24 |
25 | if (isAvailable) {
26 | val repos = doc.select(".repo-list h3 a").map { it.attr("href") }
27 | cache.put(url, repos)
28 | return repos
29 | } else {
30 | return cache.get(url, listOf())
31 | }
32 | }
33 | }
34 |
35 | fun main(args: Array) {
36 | println(GithubTrending(Cache(ObjectMapper())).fetch().size)
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/LanguageCodes.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | /**
4 | * List of languages names - codes according ISO 639-1
5 | * https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
6 | *
7 | * @author Ibragimov Ruslan
8 | * @since 0.1
9 | */
10 | enum class LanguageCodes(val id: String) {
11 | EN("english"),
12 | RU("russian"),
13 | IT("italian"),
14 | ZH("chinese"),
15 | HE("hebrew");
16 |
17 | companion object {
18 | fun contains(language: String) =
19 | values().map(LanguageCodes::id).contains(language)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/LinkChecker.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import okhttp3.OkHttpClient
4 | import okhttp3.Request
5 | import okhttp3.Response
6 | import org.slf4j.LoggerFactory
7 | import java.util.concurrent.CompletableFuture
8 |
9 | class LinkChecker(private val categories: List) {
10 | fun check(): Boolean {
11 | return okhttp { client ->
12 | val futures = mapToFuture(categories, client)
13 |
14 | CompletableFuture.allOf(*futures).handle { _, exception ->
15 | if (exception != null) {
16 | val cause = exception.cause
17 | if (cause is OkHttpException) {
18 | logger.error("Requests to {}, completed exceptionally!", cause.request.url(), cause)
19 | } else {
20 | logger.error("One of request, completed exceptionally!", exception)
21 | }
22 | client.dispatcher().cancelAll()
23 | false
24 | } else {
25 | val unsuccessful = futures.map { it.get() }.filter { !it.isSuccessful }
26 |
27 | if (unsuccessful.isNotEmpty()) {
28 | unsuccessful.forEach {
29 | logger.error("Link {} return status {}", it.request().url(), it.code())
30 | }
31 | false
32 | } else {
33 | logger.info("All links are good.")
34 | true
35 | }
36 | }
37 | }.get()
38 | }
39 | }
40 |
41 | private fun mapToFuture(categories: List,
42 | client: OkHttpClient): Array> {
43 | return categories.map { category ->
44 | category.subcategories.map { subcategory ->
45 | subcategory.links.map { link ->
46 | get(link.href, client)
47 | }
48 | }.flatten()
49 | }.flatten().toTypedArray()
50 | }
51 |
52 | private fun get(url: String, client: OkHttpClient): CompletableFuture {
53 | val request = Request.Builder()
54 | .url(url)
55 | .build()
56 |
57 | return client.newCall(request).async()
58 | }
59 |
60 | companion object {
61 | private val logger = LoggerFactory.getLogger("LinkChecker")
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/LinkCheckerConfig.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | data class LinkCheckerConfig(val whitelist: List = listOf())
4 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/Model.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import link.kotlin.scripts.LinkType.article
4 | import link.kotlin.scripts.LinkType.slides
5 | import link.kotlin.scripts.LinkType.video
6 | import link.kotlin.scripts.LinkType.webinar
7 | import link.kotlin.scripts.model.Link
8 |
9 | enum class LinkType {
10 | none,
11 | github,
12 | bitbucket,
13 | blog,
14 | kug,
15 | article,
16 | video,
17 | slides,
18 | webinar
19 | }
20 |
21 | fun LinkType.toView() = when (this) {
22 | article -> "Articles, Blog Posts"
23 | video -> "Videos"
24 | slides -> "Slides"
25 | webinar -> "Webinars"
26 | else -> ""
27 | }
28 |
29 |
30 |
31 | data class Subcategory(
32 | val id: String? = null,
33 | val name: String,
34 | val links: MutableList
35 | ) {
36 | operator fun Link.unaryPlus() = links.add(this)
37 | }
38 |
39 | data class Category(
40 | val id: String? = null,
41 | val name: String,
42 | val subcategories: MutableList
43 | ) {
44 | operator fun Subcategory.unaryPlus() = subcategories.add(this)
45 | }
46 |
47 | enum class ArticleFeature {
48 | mathjax,
49 | highlightjs
50 | }
51 |
52 | typealias Links = List
53 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/OkHttpExtensions.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import okhttp3.Call
4 | import okhttp3.Callback
5 | import okhttp3.OkHttpClient
6 | import okhttp3.Request
7 | import okhttp3.Response
8 | import java.io.IOException
9 | import java.util.concurrent.CompletableFuture
10 | import kotlin.coroutines.experimental.Continuation
11 | import kotlin.coroutines.experimental.suspendCoroutine
12 |
13 |
14 | class OkHttpException(val request: Request,
15 | val exception: Exception) : RuntimeException(exception)
16 |
17 | suspend fun Call.await(): Response = suspendCoroutine { cont: Continuation ->
18 | this.enqueue(object : Callback {
19 | override fun onResponse(call: Call, response: Response) {
20 | cont.resume(response)
21 | }
22 |
23 | override fun onFailure(call: Call, exception: IOException) {
24 | cont.resumeWithException(OkHttpException(call.request(), exception))
25 | }
26 | })
27 | }
28 |
29 | fun Call.async(): CompletableFuture {
30 | val future = CompletableFuture()
31 |
32 | this.enqueue(object : Callback {
33 | override fun onResponse(call: Call, response: Response) {
34 | future.complete(response)
35 | }
36 |
37 | override fun onFailure(call: Call, exception: IOException) {
38 | future.completeExceptionally(OkHttpException(call.request(), exception))
39 | }
40 | })
41 |
42 | return future
43 | }
44 |
45 | fun okhttp(call: (OkHttpClient) -> T): T {
46 | val client = OkHttpClient()
47 |
48 | client.dispatcher().maxRequests = 200
49 | client.dispatcher().maxRequestsPerHost = 100
50 |
51 | try {
52 | return call(client)
53 | } finally {
54 | client.dispatcher().cancelAll()
55 | client.dispatcher().executorService().shutdown()
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/ProjectLinks.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import java.nio.file.Files
4 | import java.nio.file.Paths
5 |
6 | private val files = listOf(
7 | "Links.kts",
8 | "Libraries.kts",
9 | "Projects.kts",
10 | "Android.kts",
11 | "JavaScript.kts",
12 | "Native.kts",
13 | "UserGroups.kts"
14 | )
15 |
16 | class ProjectLinks(private val compiler: ScriptCompiler = DefaultScriptCompiler()) {
17 | private val _links by lazy {
18 | files.map(this::linksFromFile)
19 | }
20 |
21 | fun getLinks(): List {
22 | return _links
23 | }
24 |
25 | private fun linksFromFile(path: String): Category {
26 | return compiler.execute(Files.newInputStream(Paths.get("links/$path")))
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/RssGenerator.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import com.rometools.rome.feed.synd.SyndCategoryImpl
4 | import com.rometools.rome.feed.synd.SyndContentImpl
5 | import com.rometools.rome.feed.synd.SyndEntry
6 | import com.rometools.rome.feed.synd.SyndEntryImpl
7 | import com.rometools.rome.feed.synd.SyndFeedImpl
8 | import com.rometools.rome.feed.synd.SyndImageImpl
9 | import com.rometools.rome.io.SyndFeedOutput
10 | import java.io.StringWriter
11 | import java.time.Instant
12 | import java.util.Date
13 |
14 |
15 |
16 | interface RssGenerator {
17 | fun generate(name: String, limit: Int): String
18 | }
19 |
20 | class DefaultRssGenerator(private val articles: List) : RssGenerator {
21 | override fun generate(name: String, limit: Int): String {
22 | val feed = SyndFeedImpl().apply {
23 | title = "Kotlin Programming Language"
24 | link = "https://kotlin.link/"
25 | uri = "https://kotlin.link/$name"
26 | description = "News, blog posts, projects, podcasts, videos and other. All information about Kotlin."
27 | feedType = "atom_1.0" // or RSS2?
28 | image = SyndImageImpl().apply {
29 | link = "https://kotlin.link/favicon.ico"
30 | }
31 | docs = "https://validator.w3.org/feed/docs/rss2.html"
32 | author = "ruslan@ibragimov.by (Ruslan Ibragimov)"
33 | webMaster = "ruslan@ibragimov.by (Ruslan Ibragimov)"
34 | copyright = "CC0 1.0 Universal (CC0 1.0)"
35 | language = "en"
36 | categories = listOf(
37 | SyndCategoryImpl().apply { this.name = "Kotlin" },
38 | SyndCategoryImpl().apply { this.name = "JVM" },
39 | SyndCategoryImpl().apply { this.name = "Programming" },
40 | SyndCategoryImpl().apply { this.name = "Android" }
41 | )
42 | generator = "Kotlin 1.1.1"
43 | publishedDate = Date.from(Instant.now())
44 | entries = articles.take(limit).map(::toSyndEntry)
45 | }
46 |
47 | val writer = StringWriter()
48 | val output = SyndFeedOutput()
49 | output.output(feed, writer)
50 | return writer.buffer.toString()
51 | }
52 | }
53 |
54 | private fun toSyndEntry(article: Article): SyndEntry {
55 | return SyndEntryImpl().apply {
56 | uri = article.url
57 | link = "https://kotlin.link/articles/${article.filename}"
58 | title = article.title
59 | author = article.author
60 | description = SyndContentImpl().also { content ->
61 | content.value = article.description
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/ScriptCompiler.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import org.jetbrains.kotlin.script.jsr223.KotlinJsr223JvmLocalScriptEngineFactory
4 | import java.io.InputStream
5 | import java.util.concurrent.atomic.AtomicInteger
6 | import javax.script.ScriptEngine
7 |
8 | interface ScriptCompiler {
9 | fun execute(inputStream: InputStream): T
10 | }
11 |
12 | class DefaultScriptCompiler : ScriptCompiler {
13 | private val factory = KotlinJsr223JvmLocalScriptEngineFactory()
14 | private var scriptEngine = factory.scriptEngine
15 | private var counter = AtomicInteger(0)
16 |
17 | private fun getEngine(): ScriptEngine {
18 | if (counter.incrementAndGet() > 20) {
19 | LOGGER.info("Create new script engine.")
20 | scriptEngine = factory.scriptEngine
21 | counter.set(0)
22 | }
23 |
24 | return scriptEngine
25 | }
26 |
27 | @Suppress("UNCHECKED_CAST")
28 | override fun execute(inputStream: InputStream): T {
29 | return getEngine().eval(inputStream.reader()) as T
30 | }
31 |
32 | companion object {
33 | private val LOGGER = logger()
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/Sitemap.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | class SitemapUrl(val url: String)
4 |
5 | class Sitemap {
6 | private val builder = StringBuilder()
7 |
8 | init {
9 | builder.append("""
10 |
11 |
12 | """.trimIndent())
13 | }
14 |
15 | operator fun SitemapUrl.unaryPlus() {
16 | val url = """
17 |
18 | ${this.url}
19 |
20 | """.trimIndent()
21 |
22 | builder.append(url)
23 | }
24 |
25 | fun getSiteMap(): String {
26 | builder.append("")
27 | return builder.toString()
28 | }
29 | }
30 |
31 | fun sitemap(callback: Sitemap.() -> Unit): String {
32 | val sm = Sitemap()
33 | callback(sm)
34 | return sm.getSiteMap()
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/SitemapGenerator.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 |
4 | interface SitemapGenerator {
5 | fun generate(articles: List): String
6 | }
7 |
8 | class DefaultSitemapGenerator(
9 | val configuration: ApplicationConfiguration
10 | ) : SitemapGenerator {
11 |
12 | override fun generate(articles: List): String {
13 | return sitemap {
14 | +SitemapUrl(configuration.siteUrl)
15 |
16 | articles.forEach {
17 | +SitemapUrl("${configuration.siteUrl}articles/${it.filename}")
18 | }
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/Utils.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import org.slf4j.Logger
4 | import org.slf4j.LoggerFactory
5 | import java.time.Instant
6 | import java.time.LocalDateTime
7 | import java.time.ZoneId
8 |
9 | inline fun logger(): Logger = LoggerFactory.getLogger(T::class.java)
10 |
11 | fun parseInstant(date: String): LocalDateTime {
12 | return LocalDateTime.ofInstant(Instant.parse(date), ZoneId.of("UTC"))
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/kotlin/link/kotlin/scripts/model/Link.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts.model
2 |
3 | import link.kotlin.scripts.LinkType
4 |
5 | data class Link(
6 | val name: String,
7 | val href: String = "",
8 | val desc: String = "",
9 | val type: LinkType = LinkType.none,
10 | val tags: Array = arrayOf(),
11 | val whitelisted: Boolean = false,
12 | var star: Int? = null,
13 | var update: String? = null
14 | )
15 |
--------------------------------------------------------------------------------
/src/test/kotlin/link/kotlin/scripts/DefaultStarsGeneratorTest.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import org.junit.Assert.assertEquals
4 | import org.junit.Test
5 |
6 | class DefaultStarsGeneratorTest {
7 |
8 | @Test fun parseDate() {
9 | assertEquals(21, parseInstant("2017-04-21T10:33:23Z").dayOfMonth)
10 | assertEquals(10, parseInstant("2017-04-21T10:33:23Z").hour)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/kotlin/link/kotlin/scripts/ReadmeGeneratorKtTest.kt:
--------------------------------------------------------------------------------
1 | package link.kotlin.scripts
2 |
3 | import org.junit.Assert.assertEquals
4 | import org.junit.Test
5 |
6 | internal class ReadmeGeneratorKtTest {
7 | @Test fun testNameNormalizer() {
8 | assertEquals("-", normalizeName("--- ---"))
9 | assertEquals("-", normalizeName("-"))
10 | assertEquals("-", normalizeName("\\"))
11 | assertEquals("-", normalizeName("-,-"))
12 | }
13 | }
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "jsx": "react",
6 | "lib": [
7 | "dom",
8 | "es5",
9 | "es6",
10 | "es7"
11 | ]
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require("path");
2 | const webpack = require("webpack");
3 | const HtmlWebpackPlugin = require("html-webpack-plugin");
4 | const autoprefixer = require("autoprefixer");
5 |
6 | module.exports = function (options = {}) {
7 | // Settings
8 | // --env.NODE_ENV root --env.SOURCE_MAP source-map ...
9 | const NODE_ENV = options.NODE_ENV || "development"; // "production"
10 | const SOURCE_MAP = options.SOURCE_MAP || "eval-source-map"; // "source-map"
11 |
12 | console.log(`
13 | Build started with following configuration:
14 | ===========================================
15 | → NODE_ENV: ${NODE_ENV}
16 | → SOURCE_MAP: ${SOURCE_MAP}
17 | `);
18 |
19 | return {
20 | entry: {
21 | vendor: [
22 | "babel-polyfill"
23 | ],
24 | app: [
25 | path.resolve(__dirname, "app", "src", "main.tsx")
26 | ]
27 | },
28 | output: {
29 | path: path.resolve(__dirname, "dist"),
30 | filename: "[name].js?[hash]",
31 | publicPath: "/"
32 | },
33 | resolve: {
34 | extensions: [".ts", ".tsx", ".js"]
35 | },
36 | bail: false,
37 | devtool: SOURCE_MAP,
38 | module: {
39 | rules: [{
40 | test: /\.tsx?$/,
41 | exclude: /node_modules/,
42 | loader: "ts-loader"
43 | }, {
44 | test: /\.less$/,
45 | use: [{
46 | loader: "style-loader"
47 | }, {
48 | loader: "css-loader",
49 | options: {
50 | modules: true,
51 | localIdentName: "[name]_[local]"
52 | }
53 | }, {
54 | loader: "postcss-loader",
55 | options: {
56 | plugins: function () {
57 | return [
58 | autoprefixer
59 | ];
60 | }
61 | }
62 | }, {
63 | loader: "less-loader"
64 | }]
65 | }, {
66 | test: /\.(png|jpg|gif|svg)$/,
67 | loader: "url-loader",
68 | options: {
69 | limit: 32768
70 | }
71 | }]
72 | },
73 | plugins: createListOfPlugins({NODE_ENV}),
74 | devServer: {
75 | stats: {
76 | chunkModules: false,
77 | colors: true
78 | },
79 | historyApiFallback: true,
80 | inline: false
81 | }
82 | }
83 | };
84 |
85 | function createListOfPlugins({NODE_ENV}) {
86 | const plugins = [
87 | new HtmlWebpackPlugin({
88 | template: path.resolve(__dirname, "app", "index.html"),
89 | favicon: path.resolve(__dirname, "app", "favicon.ico"),
90 | hash: true
91 | }),
92 | new webpack.DefinePlugin({
93 | "process.env": {
94 | "NODE_ENV": JSON.stringify(NODE_ENV)
95 | }
96 | })
97 | ];
98 |
99 | if (NODE_ENV === "production") {
100 | plugins.push(
101 | new webpack.optimize.CommonsChunkPlugin({
102 | name: "vendor",
103 | minChunks: 2
104 | })
105 | );
106 | }
107 |
108 | return plugins;
109 | }
110 |
--------------------------------------------------------------------------------