Replace Annotation to compiler args. (#1602)

Change-Id: I691fc0f14d4bb2c62224dc77a5d0f3a08b59a75b
pull/1731/head
Jaehwa Noh 2 weeks ago committed by GitHub
parent 4a0723441f
commit 81e7ef0a05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -90,5 +90,19 @@ private inline fun <reified T : KotlinTopLevelExtension> Project.configureKotlin
// Enable experimental coroutines APIs, including Flow
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
)
freeCompilerArgs.add(
/**
* Remove this args after Phase 3.
* https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-consistent-copy-visibility/#deprecation-timeline
*
* Deprecation timeline
* Phase 3. (Supposedly Kotlin 2.2 or Kotlin 2.3).
* The default changes.
* Unless ExposedCopyVisibility is used, the generated 'copy' method has the same visibility as the primary constructor.
* The binary signature changes. The error on the declaration is no longer reported.
* '-Xconsistent-data-class-copy-visibility' compiler flag and ConsistentCopyVisibility annotation are now unnecessary.
*/
"-Xconsistent-data-class-copy-visibility"
)
}
}

@ -22,7 +22,6 @@ import kotlinx.datetime.Instant
* A [NewsResource] with additional user information such as whether the user is following the
* news resource's topics and whether they have saved (bookmarked) this news resource.
*/
@ConsistentCopyVisibility
data class UserNewsResource internal constructor(
val id: String,
val title: String,

Loading…
Cancel
Save