Define Constants in Gradle in Java Project
<p>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 <code>buildConfigField</code>. How can I do it in Java project?</p>

<p>Is there a tool that is equivalent to the following?</p>

<pre><code>android {
    buildTypes {
        debug {
            buildConfigField "String", "BASE_URL", "http://debug.server.com"
        }
        release {
            buildConfigField "String", "BASE_URL", "http://release.server.com"
        }
    }
}
</code></pre>