小编shi*_*.r.的帖子

Gradle:从编译闭包中排除并包含多个组/模块

可能尚未提供此语法,但我要求避免冗余代码.现在我排除这样的罐子

 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)

或者是否有任何其他短代码做同样的事情.

谢谢.

gradle

8
推荐指数
1
解决办法
4786
查看次数

如何检查字节数组是.emf还是.wmf格式

我可以使用下面的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图像呢?

提前致谢...

java

3
推荐指数
1
解决办法
1061
查看次数

标签 统计

gradle ×1

java ×1