可能尚未提供此语法,但我要求避免冗余代码.现在我排除这样的罐子
compile ('com.mygroup:myJar:0.1.1-M1-SNAPSHOT+') {
exclude group: 'org.apache.xmlgraphics'
exclude group:'org.apache.avalon.framework'
exclude group:'net.engio'
exclude group: 'com.google.guava'
}
Run Code Online (Sandbox Code Playgroud)
如何在一行代码中排除多个组/模块,例如,此语法
compile ('com.mygroup:myJar:0.1.1-M1-SNAPSHOT+'){
exclude group: ['org.apache.xmlgraphics', 'org.apache.avalon.framework', 'net.engio', 'com.google.guava']
}
Run Code Online (Sandbox Code Playgroud)
或者是否有任何其他短代码做同样的事情.
谢谢.
我可以使用下面的java代码检查字节数组是否是像wmf、emf这样的图元文件图像
private boolean isMetaFileFormat(byte[] pictureData)
{
BufferedImage image = null;
try
{
image = ImageIO.read(new ByteArrayInputStream(pictureData));
if(image != null)
return false;
}
catch (Exception e){ }
return true;
}
Run Code Online (Sandbox Code Playgroud)
但如何具体检查它是emf还是wmf图像呢?
提前致谢...