Skip to content

[spring-boot-gradle-plugin] Add support for environments in gradle #7274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
raderio opened this issue Nov 2, 2016 · 1 comment
Closed

[spring-boot-gradle-plugin] Add support for environments in gradle #7274

raderio opened this issue Nov 2, 2016 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@raderio
Copy link

raderio commented Nov 2, 2016

We have 3 properties file

application.properties
application-local.properties
application-dev.properties

application.properties
spring.profiles.active=@environment@

build.gradle

if (! hasProperty("environment")) {
    ext.environment = "local"
}

processResources {
    exclude {
        it.file.name ==~ Pattern.compile("application-((?!$environment).)*\\.properties")
    }
    filter(ReplaceTokens, tokens: [environment: environment])
}

./gradlew -Penvironment=dev run

Please add something similar to this in plugin.

@raderio raderio changed the title Add support for environments in gradle [spring-boot-gradle-plugin] Add support for environments in gradle Nov 2, 2016
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 2, 2016
@wilkinsona
Copy link
Member

Duplicates #1176.

@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants