use of com.android.annotations.VisibleForTesting in project android by JetBrains.
the class ResourceFolderRepositoryFileCacheImpl method stampVersion.
@Override
@VisibleForTesting
public void stampVersion(@NotNull File rootDir, int version) {
File versionFile = new File(rootDir, CACHE_VERSION_FILENAME);
try {
FileUtil.ensureExists(rootDir);
final DataOutputStream out = new DataOutputStream(new FileOutputStream(versionFile));
try {
out.writeInt(version);
myCacheVersion = version;
} finally {
out.close();
}
} catch (FileNotFoundException e) {
getLogger().error("Could not write cache version to file: " + versionFile, e);
} catch (IOException e) {
getLogger().error("Could not write cache version to file: " + versionFile, e);
}
}
use of com.android.annotations.VisibleForTesting in project android by JetBrains.
the class AndroidTestPackage method getClassFilter.
@Override
@VisibleForTesting
public TestClassFilter getClassFilter(JUnitConfiguration.Data data) throws CantRunException {
TestClassFilter classFilter = super.getClassFilter(data);
JUnitConfiguration configuration = getConfiguration();
Module[] modules = configuration instanceof AndroidJUnitConfiguration ? ((AndroidJUnitConfiguration) configuration).getModulesToCompile() : configuration.getModules();
for (Module module : modules) {
TestArtifactSearchScopes testArtifactSearchScopes = TestArtifactSearchScopes.get(module);
if (testArtifactSearchScopes != null) {
classFilter = classFilter.intersectionWith(testArtifactSearchScopes.getAndroidTestExcludeScope());
}
}
return classFilter;
}
Aggregations