Skip to content

Commit

Permalink
Replace deprecated kotlin-android-extensions with kotlin-parcelize
Browse files Browse the repository at this point in the history
  • Loading branch information
wax911 committed Apr 8, 2021
1 parent 8e0090b commit 181820b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import org.gradle.kotlin.dsl.get
import org.jetbrains.dokka.gradle.DokkaTask
import co.anitrend.retrofit.graphql.buildSrc.plugin.extensions.baseExtension
import co.anitrend.retrofit.graphql.buildSrc.plugin.extensions.baseAppExtension
import co.anitrend.retrofit.graphql.buildSrc.plugin.extensions.androidExtensionsExtension
import co.anitrend.retrofit.graphql.buildSrc.plugin.extensions.publishingExtension
import co.anitrend.retrofit.graphql.buildSrc.plugin.extensions.libraryExtension
import co.anitrend.retrofit.graphql.buildSrc.common.Versions
Expand Down Expand Up @@ -200,7 +199,4 @@ internal fun Project.configureOptions() {
applyConfiguration(this@configureOptions)
}
}

println("Enabling experimental extension options for feature module -> ${project.path}")
androidExtensionsExtension().isExperimental = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ private fun Project.applyModulePlugin() {
internal fun Project.configurePlugins() {
applyModulePlugin()
plugins.apply("kotlin-android")
plugins.apply("kotlin-android-extensions")
if (isSampleModule())
plugins.apply("kotlin-parcelize")
if (isSampleModule()) {
plugins.apply("kotlin-kapt")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import org.gradle.api.reporting.ReportingExtension
import org.gradle.api.tasks.SourceSetContainer
import org.gradle.kotlin.dsl.getByType
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
import org.jetbrains.kotlin.gradle.internal.AndroidExtensionsExtension
import org.jetbrains.kotlin.gradle.testing.internal.KotlinTestsRegistry

internal fun Project.baseExtension() =
Expand Down Expand Up @@ -52,9 +51,6 @@ internal fun Project.kotlinAndroidProjectExtension() =
internal fun Project.kotlinTestsRegistry() =
extensions.getByType<KotlinTestsRegistry>()

internal fun Project.androidExtensionsExtension() =
extensions.getByType<AndroidExtensionsExtension>()

internal fun Project.publishingExtension() =
extensions.getByType<PublishingExtension>()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.wax911.library.model.request

import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
import kotlinx.android.parcel.RawValue
import kotlinx.parcelize.Parcelize
import kotlinx.parcelize.RawValue
import java.util.*

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.wax911.library.model.request

import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
import kotlinx.parcelize.Parcelize

/**
* Query & Variable builder for graph requests
Expand Down

0 comments on commit 181820b

Please sign in to comment.