diff options
Diffstat (limited to 'javatests/dagger/hilt/android/processor/internal/viewmodel/TestUtils.kt')
-rw-r--r-- | javatests/dagger/hilt/android/processor/internal/viewmodel/TestUtils.kt | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/javatests/dagger/hilt/android/processor/internal/viewmodel/TestUtils.kt b/javatests/dagger/hilt/android/processor/internal/viewmodel/TestUtils.kt index 713cd22b8..d833c32dd 100644 --- a/javatests/dagger/hilt/android/processor/internal/viewmodel/TestUtils.kt +++ b/javatests/dagger/hilt/android/processor/internal/viewmodel/TestUtils.kt @@ -1,15 +1,16 @@ package dagger.hilt.android.processor.internal.viewmodel -import com.google.testing.compile.JavaFileObjects +import dagger.hilt.android.testing.compile.HiltCompilerTests -val GENERATED_TYPE = try { - Class.forName("javax.annotation.processing.Generated") - "javax.annotation.processing.Generated" -} catch (_: ClassNotFoundException) { - "javax.annotation.Generated" -} +val GENERATED_TYPE = + try { + Class.forName("javax.annotation.processing.Generated") + "javax.annotation.processing.Generated" + } catch (_: ClassNotFoundException) { + "javax.annotation.Generated" + } const val GENERATED_ANNOTATION = "@Generated(\"dagger.hilt.android.processor.internal.viewmodel.ViewModelProcessor\")" -fun String.toJFO(qName: String) = JavaFileObjects.forSourceString(qName, this.trimIndent()) +fun String.toJFO(qName: String) = HiltCompilerTests.javaSource(qName, this.trimIndent()) |