com.faker.android.JavaSrcExclusion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle Show documentation
Show all versions of gradle Show documentation
fakeradnroid gradle builder
package com.faker.android;
import java.io.File;
public class JavaSrcExclusion implements ClassExclusion{
File baseDir;
public JavaSrcExclusion(File baseDir) {
this.baseDir = baseDir;
}
@Override
public boolean exclude(String smaliFileName) {//TODO
String preName = null;
if(smaliFileName.contains("$")){
preName = smaliFileName.split("\\$")[0];
}else {
preName = smaliFileName.substring(0,smaliFileName.lastIndexOf("."));
}
File fileJava = new File(baseDir,preName+".java");
if(fileJava.exists()){
System.out.println("Java class is exsit "+fileJava.getAbsolutePath() +"this smali file exclude "+smaliFileName);
return true;
}
return false;
}
}