diff --git a/sample/src/main/java/com/airbnb/android/showkasesample/CustomShape.kt b/sample/src/main/java/com/airbnb/android/showkasesample/CustomShape.kt index 9873c75b..f56e1099 100644 --- a/sample/src/main/java/com/airbnb/android/showkasesample/CustomShape.kt +++ b/sample/src/main/java/com/airbnb/android/showkasesample/CustomShape.kt @@ -13,7 +13,7 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.airbnb.android.submodule.showkasesample.FontPreview -@Preview(name = "Shape 100 by 100", group = "Shapes", widthDp = 100, heightDp = 100) +@Preview(name = "Shapessss 200 by 200", group = "Shapes", widthDp = 100, heightDp = 100) @Preview(name = "Shape 150 by 150", group = "Shapes", widthDp = 150, heightDp = 150) annotation class CustomShape diff --git a/showkase-processor/src/main/java/com/airbnb/android/showkase/processor/writer/ShowkaseBrowserWriter.kt b/showkase-processor/src/main/java/com/airbnb/android/showkase/processor/writer/ShowkaseBrowserWriter.kt index 07a3391b..6e948772 100644 --- a/showkase-processor/src/main/java/com/airbnb/android/showkase/processor/writer/ShowkaseBrowserWriter.kt +++ b/showkase-processor/src/main/java/com/airbnb/android/showkase/processor/writer/ShowkaseBrowserWriter.kt @@ -3,6 +3,7 @@ package com.airbnb.android.showkase.processor.writer import androidx.room.compiler.processing.XElement import androidx.room.compiler.processing.XFiler import androidx.room.compiler.processing.XProcessingEnv +import androidx.room.compiler.processing.addOriginatingElement import androidx.room.compiler.processing.get import androidx.room.compiler.processing.isTypeElement import androidx.room.compiler.processing.writeTo @@ -192,7 +193,10 @@ internal class ShowkaseBrowserWriter(private val environment: XProcessingEnv) { } fileBuilder.addType( - TypeSpec.classBuilder(generatedClassName).addFunctions(functions).build() + with(TypeSpec.classBuilder(generatedClassName).addFunctions(functions)) { + addOriginatingElement(element) + build() + } ).addFileComment("This is an auto-generated file. Please do not edit/modify this file.") fileBuilder.build().writeTo(environment.filer, mode = XFiler.Mode.Aggregating) }