@Test public void needsPreprocessing_nonVector() throws Exception { File drawable = new File(mRes, "drawable"); File input = new File(drawable, "icon.xml"); Files.createParentDirs(input); Files.write("<bitmap android:src=\"@drawable/icon\" />", input, defaultCharset()); assertFalse(mRenderer.needsPreprocessing(input)); }
@Override public boolean needsPreprocessing(File resourceFile) { return mMinSdk < MIN_SDK_WITH_VECTOR_SUPPORT && isXml(resourceFile) && isInDrawable(resourceFile) && getEffectiveVersion(resourceFile) < MIN_SDK_WITH_VECTOR_SUPPORT && isRootVector(resourceFile); }
VectorDrawableRenderer implements ResourcePreprocessor { @Override public boolean needsPreprocessing(File resourceFile) { return mMinSdk < MIN_SDK_WITH_VECTOR_SUPPORT && isXml(resourceFile) && isInDrawable(resourceFile) && getEffectiveVersion(resourceFile) < MIN_SDK_WITH_VECTOR_SUPPORT && isRootVector(resourceFile); } }
VectorDrawableRenderer implements ResourcePreprocessor { @Override public boolean needsPreprocessing(File resourceFile) { return mMinSdk < MIN_SDK_WITH_VECTOR_SUPPORT && isXml(resourceFile) && isInDrawable(resourceFile) && getEffectiveVersion(resourceFile) < MIN_SDK_WITH_VECTOR_SUPPORT && isRootVector(resourceFile); } VectorDrawableRenderer(
            int minSdk,
            File outputDir,
            Collection<Density> densities,
            ILogger logger); }
VectorDrawableRenderer implements ResourcePreprocessor { @Override public boolean needsPreprocessing(File resourceFile) { return mMinSdk < MIN_SDK_WITH_VECTOR_SUPPORT && isXml(resourceFile) && isInDrawable(resourceFile) && getEffectiveVersion(resourceFile) < MIN_SDK_WITH_VECTOR_SUPPORT && isRootVector(resourceFile); } VectorDrawableRenderer(
            int minSdk,
            File outputDir,
            Collection<Density> densities,
            ILogger logger); @Override boolean needsPreprocessing(File resourceFile); @Override Collection<File> getFilesToBeGenerated(File inputXmlFile); @Override void generateFile(File toBeGenerated, File original); }
VectorDrawableRenderer implements ResourcePreprocessor { @Override public boolean needsPreprocessing(File resourceFile) { return mMinSdk < MIN_SDK_WITH_VECTOR_SUPPORT && isXml(resourceFile) && isInDrawable(resourceFile) && getEffectiveVersion(resourceFile) < MIN_SDK_WITH_VECTOR_SUPPORT && isRootVector(resourceFile); } VectorDrawableRenderer(
            int minSdk,
            File outputDir,
            Collection<Density> densities,
            ILogger logger); @Override boolean needsPreprocessing(File resourceFile); @Override Collection<File> getFilesToBeGenerated(File inputXmlFile); @Override void generateFile(File toBeGenerated, File original); static final int MIN_SDK_WITH_VECTOR_SUPPORT; }