Skip to content

Commit a166e70

Browse files
committed
Define compiler plugin annotations
1 parent 93cf009 commit a166e70

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
2+
3+
plugins {
4+
id("kmp-observableviewmodel-kotlin-multiplatform")
5+
id("kmp-observableviewmodel-publish")
6+
}
7+
8+
kotlin {
9+
explicitApi()
10+
jvmToolchain(11)
11+
12+
13+
macosX64()
14+
macosArm64()
15+
iosArm64()
16+
iosX64()
17+
iosSimulatorArm64()
18+
watchosArm32()
19+
watchosArm64()
20+
watchosX64()
21+
watchosSimulatorArm64()
22+
watchosDeviceArm64()
23+
tvosArm64()
24+
tvosX64()
25+
tvosSimulatorArm64()
26+
jvm()
27+
js {
28+
browser()
29+
nodejs()
30+
}
31+
linuxArm64()
32+
linuxX64()
33+
mingwX64()
34+
@OptIn(ExperimentalWasmDsl::class)
35+
wasmJs {
36+
browser()
37+
nodejs()
38+
d8()
39+
}
40+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.rickclephas.kmp.observableviewmodel
2+
3+
import kotlin.experimental.ExperimentalObjCRefinement
4+
import kotlin.native.HidesFromObjC
5+
6+
/**
7+
* Identifies observable `StateFlow` properties.
8+
*/
9+
@Target(AnnotationTarget.PROPERTY)
10+
@Retention(AnnotationRetention.BINARY)
11+
@MustBeDocumented
12+
@OptIn(ExperimentalObjCRefinement::class)
13+
@HidesFromObjC
14+
public annotation class ObservableState
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.rickclephas.kmp.observableviewmodel
2+
3+
/**
4+
* Identifies observable `ViewModel`s.
5+
*/
6+
@Target(AnnotationTarget.CLASS)
7+
@Retention(AnnotationRetention.BINARY)
8+
@MustBeDocumented
9+
public annotation class ObservableViewModel

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ dependencyResolutionManagement {
1717

1818
rootProject.name = "kmp-observableviewmodel"
1919

20+
include(":kmp-observableviewmodel-annotations")
2021
include(":kmp-observableviewmodel-core")
2122
include(":kmp-observableviewmodel-properties")

0 commit comments

Comments
 (0)