Build types in Java programs

(Per Johansson) #1


I am using Gradle 3 to build Java programs, distributed in war format. I’d like to create different profiles for test and production from the same source tree, with different log configuration files, etc.

Looking in the manual chapter 70.16 there is a configuration for different build types

model {
    buildTypes {

but it seems to be intended for native programs such as C++. It needs apply plugin: 'cpp'.

Is there a way to do this for Java programs?