Skip to content

Commit

Permalink
added kotlinx-serialization plugin and also bumped Kotlin version to …
Browse files Browse the repository at this point in the history
…1.3.61 given the latest serialization needs it form 0.14.0 and on https://github.com/Kotlin/kotlinx.serialization#incompatible-changes
  • Loading branch information
mzorz committed Dec 16, 2019
1 parent 5716b06 commit f1d0005
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlinx-serialization'
apply plugin: 'io.sentry.android.gradle'

android {
Expand Down Expand Up @@ -39,7 +40,8 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.14.0"

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
package com.automattic.portkey.compose.story

import kotlinx.serialization.Serializable

@Serializable
data class Story(val frames: ArrayList<StoryFrameItem>)
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.automattic.portkey.compose.story

import com.automattic.portkey.compose.story.StoryFrameItemType.IMAGE
import kotlinx.serialization.Serializable

@Serializable
data class StoryFrameItem(val filePath: String, val frameItemType: StoryFrameItemType = IMAGE, val name: String? = null)
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
Expand All @@ -10,6 +10,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath 'com.automattic.android:fetchstyle:1.1'
classpath 'io.sentry:sentry-android-gradle-plugin:1.7.27'
// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit f1d0005

Please sign in to comment.