Skip to content

Commit a7aea85

Browse files
committed
PR fixes
1 parent a8b8e89 commit a7aea85

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ annotation class SampleAnnotation
5757
* @property nickname The nickname.
5858
* @property age The age.
5959
*/
60-
@DataCompat(imports = ["java.util.Date"])
60+
@DataCompat(importsForDefaults = ["java.util.Date"])
6161
@SampleAnnotation
6262
private data class PersonData(
6363
@Default("\"John\" + Date(1580897313933L).toString()")

annotation/src/main/kotlin/com/tobrun/datacompat/annotation/DataCompat.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ package com.tobrun.datacompat.annotation
44
* Annotation class of DataCompat.
55
* Classes annotated with this annotation are required to be Kotlin data classes with private visibility.
66
*
7-
* @param imports if any constructor values require additional imports, they should be passed here.
7+
* @param importsForDefaults if any default values require additional imports, they should be passed here.
88
* E.g. `["android.graphics.Color"]`
99
*/
1010
@Retention(AnnotationRetention.RUNTIME)
1111
@Target(AnnotationTarget.CLASS)
12-
annotation class DataCompat(val imports: Array<String> = [])
12+
annotation class DataCompat(val importsForDefaults: Array<String> = [])

example/src/main/kotlin/com/tobrun/data/compat/example/PersonData.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ annotation class SampleAnnotation
1212
* @property nickname The nickname.
1313
* @property age The age.
1414
*/
15-
@DataCompat(imports = ["java.util.Date"])
15+
@DataCompat(importsForDefaults = ["java.util.Date"])
1616
@SampleAnnotation
1717
private data class PersonData(
1818
@Default("\"John\" + Date(1580897313933L).toString()")

processor/src/test/kotlin/com/tobrun/datacompat/DataCompatProcessorTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface EmptyInterface2
2626
* @property veryLongAndVeryDetailedDescription The very long and very detailed description.
2727
*/
2828
@Deprecated
29-
@DataCompat(imports = ["java.util.Date"])
29+
@DataCompat(importsForDefaults = ["java.util.Date"])
3030
private data class PersonData(
3131
@Default("\"John\"")
3232
val name: String,

processor/src/test/kotlin/com/tobrun/datacompat/TestAnnotation.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package com.tobrun.datacompat.annotation
99
1010
@Retention(AnnotationRetention.RUNTIME)
1111
@Target(AnnotationTarget.CLASS)
12-
annotation class DataCompat(val imports: Array<String> = [])
12+
annotation class DataCompat(val importsForDefaults: Array<String> = [])
1313
1414
@Retention(AnnotationRetention.RUNTIME)
1515
@Target(AnnotationTarget.VALUE_PARAMETER)

0 commit comments

Comments
 (0)