-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create parcelize convention plugin (#79)
* Create parcelize convention plugin * Include implementations for parcelable classes * Include actual constructor Co-authored-by: Davies Ashley <[email protected]>
- Loading branch information
Showing
13 changed files
with
52 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
build-plugins/src/main/kotlin/io.ashdavies.parcelable.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import org.gradle.kotlin.dsl.kotlin | ||
|
||
pluginManager.withPlugin("com.android.library") { | ||
plugins { id("kotlin-parcelize") } | ||
} | ||
|
||
plugins { | ||
kotlin("multiplatform") | ||
} | ||
|
||
kotlin { | ||
commonMain.dependencies { | ||
implementation(project(":parcelable-support")) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
plugins { | ||
id("io.ashdavies.default") | ||
id("kotlin-parcelize") | ||
id("io.ashdavies.parcelable") | ||
} | ||
|
||
android { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
plugins { | ||
id("io.ashdavies.default") | ||
id("kotlin-parcelize") | ||
} | ||
|
||
android { | ||
namespace = "io.ashdavies.parcelable" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest /> |
3 changes: 3 additions & 0 deletions
3
parcelable-support/src/androidMain/kotlin/io/ashdavies/parcelable/Parcelable.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.ashdavies.parcelable | ||
|
||
public actual typealias Parcelable = android.os.Parcelable |
3 changes: 3 additions & 0 deletions
3
parcelable-support/src/androidMain/kotlin/io/ashdavies/parcelable/Parcelize.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.ashdavies.parcelable | ||
|
||
public actual typealias Parcelize = kotlinx.parcelize.Parcelize |
3 changes: 3 additions & 0 deletions
3
parcelable-support/src/commonMain/kotlin/io/ashdavies/parcelable/Parcelable.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.ashdavies.parcelable | ||
|
||
public expect interface Parcelable |
5 changes: 5 additions & 0 deletions
5
parcelable-support/src/commonMain/kotlin/io/ashdavies/parcelable/Parcelize.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package io.ashdavies.parcelable | ||
|
||
@Target(AnnotationTarget.CLASS) | ||
@Retention(AnnotationRetention.BINARY) | ||
public expect annotation class Parcelize() |
3 changes: 3 additions & 0 deletions
3
parcelable-support/src/jvmMain/kotlin/io/ashdavies/parcelable/Parcelable.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.ashdavies.parcelable | ||
|
||
public actual interface Parcelable : java.io.Serializable |
5 changes: 5 additions & 0 deletions
5
parcelable-support/src/jvmMain/kotlin/io/ashdavies/parcelable/Parcelize.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package io.ashdavies.parcelable | ||
|
||
@Target(AnnotationTarget.CLASS) | ||
@Retention(AnnotationRetention.SOURCE) | ||
public actual annotation class Parcelize actual constructor() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters