Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment