Slide 1

Slide 1 text

Kotlin Multiplatform

Slide 2

Slide 2 text

@allymcleangames

Slide 3

Slide 3 text

Hello

Slide 4

Slide 4 text

• Kevin Galligan, President of Touchlab • I’ve been coding Android since before the G1, run a mobile dev shop, and since late 2015 have been largely focused on mobile code sharing • I’m going to tell you about Kotlin Multiplatform

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Kotlin?

Slide 7

Slide 7 text

• Static “Better Java” by Jetbrains • 2011 - Announced • 2016 - v1.0 • 2017 - Google++

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

JVM JS Native

Slide 10

Slide 10 text

JVM JS Native Common

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Native

Slide 13

Slide 13 text

Native Not Native

Slide 14

Slide 14 text

Native Not Native - Me(h)tal Not Native - Rock

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

–Lemmy Kilmister “It’s Little Richard’s fault, all of it. Little Richard is directly responsible for Motorhead.”

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

• Shared, testable architecture (not UI) • Smooth interop, optional code sharing • Active community • Good tools • Bonus! One platform 100% native K O T L I N M U L T I P L A T F O R M

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

I Can’t See The Future

Slide 32

Slide 32 text

safe bets

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

JVM JS Native Common

Slide 37

Slide 37 text

JVM JS Native Common

Slide 38

Slide 38 text

JVM Native Common

Slide 39

Slide 39 text

JVM Native Common Android Stuff Framework iOS Stuff

Slide 40

Slide 40 text

Common

Slide 41

Slide 41 text

Common mainThread?

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Typealias

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

Expected a method, was actually there!

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

Status

Slide 63

Slide 63 text

Kotlin/Native at .9

Slide 64

Slide 64 text

Tooling

Slide 65

Slide 65 text

Speed

Slide 66

Slide 66 text

Libraries

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

No content

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

• 5 React Native • 3 Flutter • 4 Kotlin Multiplatform • ~20% of the content! Cross Platform Droidcon

Slide 82

Slide 82 text

• Serialization • Ktor • I/O • Coroutines Jetbrains

Slide 83

Slide 83 text

Threads

Slide 84

Slide 84 text

State

Slide 85

Slide 85 text

all the code you’ve ever written not frozen frozen

Slide 86

Slide 86 text

all the code you’ve ever written not frozen frozen

Slide 87

Slide 87 text

Frozen is • A special runtime state • Like super-immutable • Only way to share data between threads

Slide 88

Slide 88 text

Data OtherMutable OtherShared Stuff MoreStuff

Slide 89

Slide 89 text

Data OtherMutable OtherShared Stuff MoreStuff

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

No content

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

It works!

Slide 98

Slide 98 text

Q3 Q2 Q4 Q1 Q2 2018 2019 0 .6 v0.7 v0.8 v0.8.2

Slide 99

Slide 99 text

Q3 Q2 Q4 Q1 Q2 2018 2019 0 .6 v0.7 v0.8 v0.8.2 v0.9 Coroutines (and other libs)

Slide 100

Slide 100 text

Q3 Q2 Q4 Q1 Q2 2018 2019 0 .6 v0.7 v0.8 v0.8.2 v0.9 Coroutines (and other libs)

Slide 101

Slide 101 text

Q3 Q2 Q4 Q1 Q2 2018 2019 0 .6 v0.7 v0.8 v0.8.2 v0.9 Coroutines (and other libs)

Slide 102

Slide 102 text

Q3 Q2 Q4 Q1 Q2 2018 2019 0 .6 v0.7 v0.8 v0.8.2 v0.9 Coroutines (and other libs) v1

Slide 103

Slide 103 text

Q3 Q2 Q4 Q1 Q2 2018 2019 0 .6 v0.7 v0.8 v0.8.2 v0.9 Coroutines (and other libs) v1 Major reactive lib Date/other libs Improved tooling Faster builds

Slide 104

Slide 104 text

Q3 Q2 Q4 Q1 Q2 2018 2019 0 .6 v0.7 v0.8 v0.8.2 v0.9 Coroutines (and other libs) v1 Major reactive lib Date/other libs Improved tooling Faster builds “Mainstream” Big apps Wasm threads

Slide 105

Slide 105 text

2010 ORMLite ActiveAndroid

Slide 106

Slide 106 text

2010 ORMLite ActiveAndroid :P

Slide 107

Slide 107 text

2010 ORMLite ActiveAndroid :P 2018 ORMLite SQLBright SQLDelight Storeio Room Cupboard SugarORM GreenDAO DBFlow Squeeky Ollie Requery Squidb

Slide 108

Slide 108 text

2018 Knarch.db SQLDelight 2025? MPSettings Jetbrains stuff

Slide 109

Slide 109 text

No content

Slide 110

Slide 110 text

[email protected] @kpgalligan

Slide 111

Slide 111 text

[email protected] @kpgalligan Discount code: AndroidSummit