Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e84502c2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update location of output." into main

parents 15ae0eae 9ea3a5c8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ import javax.lang.model.SourceVersion
import javax.lang.model.element.AnnotationValue
import javax.lang.model.element.TypeElement
import javax.tools.Diagnostic.Kind
import javax.tools.StandardLocation.CLASS_OUTPUT
import javax.tools.StandardLocation.SOURCE_OUTPUT
import kotlin.collections.set

/**
@@ -126,7 +126,7 @@ class IntDefProcessor : AbstractProcessor() {
    @Throws(IOException::class)
    private fun outputToFile(annotationTypeToIntDefMapping: Map<String, IntDefMapping>) {
        val resource = processingEnv.filer.createResource(
                CLASS_OUTPUT, "com.android.winscope", outputName)
                SOURCE_OUTPUT, "com.android.winscope", outputName)
        val writer = resource.openWriter()
        serializeTo(annotationTypeToIntDefMapping, writer)
        writer.close()
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import junit.framework.Assert.assertEquals
import org.junit.Test
import java.io.StringWriter
import javax.tools.JavaFileObject
import javax.tools.StandardLocation.CLASS_OUTPUT
import javax.tools.StandardLocation.SOURCE_OUTPUT

/**
 * Tests for [IntDefProcessor]
@@ -112,7 +112,7 @@ class IntDefProcessorTest {
                .compile(filesToCompile.toMutableList())

        assertThat(compilation).succeeded()
        assertThat(compilation).generatedFile(CLASS_OUTPUT, "com.android.winscope",
        assertThat(compilation).generatedFile(SOURCE_OUTPUT, "com.android.winscope",
                "intDefMapping.json").contentsAsUtf8String().isEqualTo(expectedFile)
    }