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

Commit 9ea3a5c8 authored by Priyanka's avatar Priyanka
Browse files

Update location of output.

Fixes: 341863041
Test: run commands in the Winscope README and check mapping updated
Change-Id: I154874a376c62ad2bb6e38ef9ca4c0865493cf34
parent 4790fc2b
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)
    }