문제

I am trying to add multiple project in one instruction dependencies (to use only one configuration closure) with gradle but I don't know how to do it.

If try to do

configurationName (
    project('subProject1') ,
    project('subProject2'),
) {
    transitive = false
}

I got an error at the configuration step, but

configurationName (
    project('subProject1') ,
) {
    transitive = false
}

configurationName (
    project('subProject2') ,
) {
    transitive = false
}

I don't know why, when

configurationName(
    [group: 'commons-dbutils', name: 'commons-dbutils', version: '1.5'],
    [group: 'org.springframework', name: 'spring-tx', version: springVersion],
    'org.apache.commons:commons-collections4:4.0'
)

works perfectly.

도움이 되었습니까?

해결책

You'll have to repeat { transitive = false } for each project dependency. Alternatively, you can make the whole configuration non-transitive (configurations.configurationName { transitive = false }).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top