Answer the question
In order to leave comments, you need to log in
How to work with Gradle Configurations (not Android)?
Hey!
I want to make sure that in a Java project there are 2 different builds (such as dev and prod), and each of these builds has its own dependencies (in particular, different loggers).
Let's say I created 2 configurations and specified different dependencies for them:
configurations {
prod { extendsFrom compile }
dev { extendsFrom compile }
}
dependencies {
dev group: 'org.slf4j', name: 'slf4j-nop', version: '1.7.22'
prod group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.9'
// compile dependencies
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question