summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marie Henaff <jmhenaff@google.com>2015-06-05 13:50:47 +0200
committerBenoit Lamarche <benoitlamarche@google.com>2015-06-18 16:12:42 +0200
commitb26de5d409752dee416aa854fd22210e2e6080b7 (patch)
tree676ff5e7136bf8feb653be9e63ceae78bca9ad22
parent80f8a5979abe953adfa889aab2e97c9a43d38e62 (diff)
downloadtoolchain_jack-b26de5d409752dee416aa854fd22210e2e6080b7.zip
toolchain_jack-b26de5d409752dee416aa854fd22210e2e6080b7.tar.gz
toolchain_jack-b26de5d409752dee416aa854fd22210e2e6080b7.tar.bz2
Rename addResource() to document it expects a directory
(cherry picked from commit b9afd7d44558114893933c2d9168607030ff7ae4) Change-Id: If366d939c72dd167b4aff315033fe74fc9741804
-rw-r--r--jack-tests/src/com/android/jack/test/toolchain/JackBasedToolchain.java4
-rw-r--r--jack-tests/tests/com/android/jack/annotation/processor/AnnotationProcessorTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java2
-rw-r--r--jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/library/LibraryTests.java2
-rw-r--r--jack-tests/tests/com/android/jack/resource/ResourceTests.java14
6 files changed, 15 insertions, 15 deletions
diff --git a/jack-tests/src/com/android/jack/test/toolchain/JackBasedToolchain.java b/jack-tests/src/com/android/jack/test/toolchain/JackBasedToolchain.java
index a08fe71..5cf13c1 100644
--- a/jack-tests/src/com/android/jack/test/toolchain/JackBasedToolchain.java
+++ b/jack-tests/src/com/android/jack/test/toolchain/JackBasedToolchain.java
@@ -87,8 +87,8 @@ public abstract class JackBasedToolchain extends AndroidToolchain {
}
@Nonnull
- public JackBasedToolchain addResource(@Nonnull File resource) {
- resImport.add(resource);
+ public JackBasedToolchain addResourceDir(@Nonnull File resourceDir) {
+ resImport.add(resourceDir);
return this;
}
diff --git a/jack-tests/tests/com/android/jack/annotation/processor/AnnotationProcessorTests.java b/jack-tests/tests/com/android/jack/annotation/processor/AnnotationProcessorTests.java
index cc65221..9b1e7cc 100644
--- a/jack-tests/tests/com/android/jack/annotation/processor/AnnotationProcessorTests.java
+++ b/jack-tests/tests/com/android/jack/annotation/processor/AnnotationProcessorTests.java
@@ -239,7 +239,7 @@ public class AnnotationProcessorTests {
{
JackBasedToolchain jack = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
jack.setAnnotationProcessorPath(processors.getPath());
- jack.addResource(classesOut);
+ jack.addResourceDir(classesOut);
jack.addToClasspath(jack.getDefaultBootClasspath());
jack.srcToLib(jackOut,
/*zipFiles=*/false,
@@ -250,7 +250,7 @@ public class AnnotationProcessorTests {
{
JackBasedToolchain jack = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
jack.setAnnotationProcessorPath(processors.getPath());
- jack.addResource(classesOut);
+ jack.addResourceDir(classesOut);
jack.addToClasspath(jack.getDefaultBootClasspath());
jack.srcToLib(jackOut,
/*zipFiles=*/false,
diff --git a/jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java b/jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java
index 99b58f2..9eb04ed 100644
--- a/jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java
+++ b/jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java
@@ -84,7 +84,7 @@ public class AnnotationProcessorErrorTest {
Collections.singletonList(ResourceAnnotationProcessor.class.getName()));
ByteArrayOutputStream errOut = new ByteArrayOutputStream();
jackApiToolchain.setErrorStream(errOut);
- jackApiToolchain.addResource(te.getOutputDexFolder());
+ jackApiToolchain.addResourceDir(te.getOutputDexFolder());
jackApiToolchain.addProperty(ResourceImporter.RESOURCE_COLLISION_POLICY.getName(),
CollisionPolicy.FAIL.name());
diff --git a/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java b/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java
index 9537ffe..5ace69f 100644
--- a/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java
+++ b/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java
@@ -604,7 +604,7 @@ public class FileConflictTests {
File lib1 = new File(TEST002_DIR, "lib1");
JackBasedToolchain toolchain = getToolchain(isApiTest);
- toolchain.addResource(new File(lib1, "rsc"));
+ toolchain.addResourceDir(new File(lib1, "rsc"));
if (errorStream != null) {
toolchain.setErrorStream(errorStream);
}
@@ -618,7 +618,7 @@ public class FileConflictTests {
File jackImport2 = AbstractTestTools.createTempDir();
File lib2 = new File(TEST002_DIR, "lib2");
toolchain = getToolchain(isApiTest);
- toolchain.addResource(new File(lib2, "rsc"));
+ toolchain.addResourceDir(new File(lib2, "rsc"));
if (errorStream != null) {
toolchain.setErrorStream(errorStream);
}
diff --git a/jack-tests/tests/com/android/jack/library/LibraryTests.java b/jack-tests/tests/com/android/jack/library/LibraryTests.java
index a9bb144..c482827 100644
--- a/jack-tests/tests/com/android/jack/library/LibraryTests.java
+++ b/jack-tests/tests/com/android/jack/library/LibraryTests.java
@@ -121,7 +121,7 @@ public class LibraryTests {
AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
File emptyLib = AbstractTestTools.createTempFile("rsc", toolchain.getLibraryExtension());
- toolchain.addResource(AbstractTestTools.getTestRootDir("com.android.jack.library.test001.lib"));
+ toolchain.addResourceDir(AbstractTestTools.getTestRootDir("com.android.jack.library.test001.lib"));
toolchain.srcToLib(emptyLib, /* zipFiles = */ true);
return emptyLib;
diff --git a/jack-tests/tests/com/android/jack/resource/ResourceTests.java b/jack-tests/tests/com/android/jack/resource/ResourceTests.java
index 7098d91..edac93e 100644
--- a/jack-tests/tests/com/android/jack/resource/ResourceTests.java
+++ b/jack-tests/tests/com/android/jack/resource/ResourceTests.java
@@ -115,7 +115,7 @@ public class ResourceTests {
// compile source file to a Jack dir
File jackFolder = AbstractTestTools.createTempDir();
JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
- toolchain.addResource(new File(FILE, "rsc"));
+ toolchain.addResourceDir(new File(FILE, "rsc"));
toolchain.addToClasspath(toolchain.getDefaultBootClasspath())
.srcToLib(
jackFolder,
@@ -168,7 +168,7 @@ public class ResourceTests {
// compile source file to a Jack dir
File jackFolder = AbstractTestTools.createTempDir();
JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
- toolchain.addResource(new File(FILE, "rsc"));
+ toolchain.addResourceDir(new File(FILE, "rsc"));
toolchain.addToClasspath(toolchain.getDefaultBootClasspath())
.srcToLib(
jackFolder,
@@ -230,7 +230,7 @@ public class ResourceTests {
// compile source file to a Jack dir
File jackFolder = AbstractTestTools.createTempDir();
JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
- toolchain.addResource(new File(FILE, "rsc"));
+ toolchain.addResourceDir(new File(FILE, "rsc"));
toolchain.addToClasspath(toolchain.getDefaultBootClasspath())
.srcToLib(
jackFolder,
@@ -264,7 +264,7 @@ public class ResourceTests {
// compile source file to a Jack dir
File jackFolder = AbstractTestTools.createTempDir();
JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
- toolchain.addResource(new File(FILE, "rsc"));
+ toolchain.addResourceDir(new File(FILE, "rsc"));
toolchain.addToClasspath(toolchain.getDefaultBootClasspath())
.srcToLib(
jackFolder,
@@ -288,7 +288,7 @@ public class ResourceTests {
// compile source file to a Jack dir
File jackFolder = AbstractTestTools.createTempDir();
JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
- toolchain.addResource(new File(FILE, "rsc"));
+ toolchain.addResourceDir(new File(FILE, "rsc"));
toolchain.addToClasspath(toolchain.getDefaultBootClasspath())
.srcToLib(
jackFolder,
@@ -321,7 +321,7 @@ public class ResourceTests {
String resource2LongPath = "com/android/jack/resource/test003/jack/A.txt";
JackBasedToolchain toolchain =
AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
- toolchain.addResource(rscFolder).addToClasspath(toolchain.getDefaultBootClasspath())
+ toolchain.addResourceDir(rscFolder).addToClasspath(toolchain.getDefaultBootClasspath())
.srcToLib(
jackOutputFolder,
/* zipFiles = */ false,
@@ -370,7 +370,7 @@ public class ResourceTests {
// compile source file to a Jack file
JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
File jackAr = AbstractTestTools.createTempFile("resourcetestjack", toolchain.getLibraryExtension());
- toolchain.addResource(new File(FILE, "rsc"));
+ toolchain.addResourceDir(new File(FILE, "rsc"));
toolchain.addToClasspath(toolchain.getDefaultBootClasspath())
.srcToLib(
jackAr,