I am building a Spring Boot project and i want to define some constants in gradle. I used to be an Android developer, and in Android you can define it with buildConfigField
. How can I do it in Java project?
Is there a tool that is equivalent to the following?
android {
buildTypes {
debug {
buildConfigField "String", "BASE_URL", "http://debug.server.com"
}
release {
buildConfigField "String", "BASE_URL", "http://release.server.com"
}
}
}