Skip to content

Commit

Permalink
Add ExperimentalUpdateGenerator to GenerateUpdate annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewCarlson committed Aug 18, 2022
1 parent 90f274b commit bf85066
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
public abstract interface annotation class kt/mobius/gen/ExperimentalUpdateGenerator : java/lang/annotation/Annotation {
}

public abstract interface annotation class kt/mobius/gen/GenerateUpdate : java/lang/annotation/Annotation {
}

1 change: 0 additions & 1 deletion mobiuskt-update-generator-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ kotlin {
browser()
}

@Suppress("UNUSED_VARIABLE")
sourceSets {
all {
explicitApi()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package kt.mobius.gen

@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
public annotation class ExperimentalUpdateGenerator
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package kt.mobius.gen

@ExperimentalUpdateGenerator
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.SOURCE)
public annotation class GenerateUpdate
8 changes: 8 additions & 0 deletions mobiuskt-update-generator-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ plugins {
kotlin("jvm")
}

kotlin {
sourceSets.all {
languageSettings {
optIn("kt.mobius.gen.ExperimentalUpdateGenerator")
}
}
}

sourceSets {
main { java.srcDir(buildDir.resolve("generated/ksp/$name/kotlin")) }
}
Expand Down
1 change: 1 addition & 0 deletions mobiuskt-update-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ kotlin {
sourceSets.all {
languageSettings {
optIn("com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview")
optIn("kt.mobius.gen.ExperimentalUpdateGenerator")
}
}
}
Expand Down

0 comments on commit bf85066

Please sign in to comment.