Skip to content

Commit

Permalink
Fix error that prevented incremental compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
vinaygaba committed May 21, 2024
1 parent 65314e6 commit 18a9b5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 18a9b5e

Please sign in to comment.