如何在Gradle中表示常春藤工件依赖项?

时间:2014-07-18 07:49:24

标签: gradle ivy

我正在尝试将现有版本从Ant + Ivy转换为Gradle,我无法在Gradle依赖项部分中研究如何表示此依赖项:

<dependency org="org" name="somelib" rev="1.0.0" conf="test-libs->runtime" force="true">
    <artifact name="somelib-some-artifact-name" type="jar" conf="test-libs"/>
</dependency>

这是我走了多远:

testRuntime(group: "org", name: "somelib", version: "1.0.0", configuration: "test-libs->runtime"){
    artifact {
        name = 'somelib-some-artifact-name'
        extension = 'jar'
        type = 'jar'
    }
}

任何想法声明对工件的依赖性的正确方法是什么?

0 个答案:

没有答案