Skip to content

Commit

Permalink
Merge branch 'master' into vinay-upgrade-showkase-to-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
vinaygaba authored May 21, 2024
2 parents 8eeb067 + c310896 commit 9dd93c3
Showing 1 changed file with 5 additions and 1 deletion.
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 9dd93c3

Please sign in to comment.