Hello ,
I am working on converting a maven based build system to gradle based build. I am having issues with following :
Issue# 1) Transitive Dependency :
I have dependency tree like this in maven pom.xml
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Here is my build.gradle
dependencies {
compile (
[group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.6.2'],
[group: 'ch.qos.logback', name: 'logback-core', version: '1.0.0'],
[group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.0']
/*
[group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.0']{
exclude(group: 'org.slf4j', name: 'slf4j-api', version: '1.6.2')
}*/
)
Please suggest how to remove transitive dependency in situation like this.
Issue#2 ) my settings.gradle look like this :
includeFlat('dns-core', 'dns-model','dns-web','dns-target-rest')
I would like to get project built in that order .
When I do gradle clean
Here is what I see:
:clean UP-TO-DATE
:dns-core:clean UP-TO-DATE
:dns-model:clean UP-TO-DATE
:dns-target-rest:clean UP-TO-DATE
:dns-web:clean UP-TO-DATE
BUILD SUCCESSFUL
why is dns-target-rest cleaned before dns-web ?
Thanks in advance.
Please suggest. I am writing a poc to suggest gradle is better than maven.