Answer the question
In order to leave comments, you need to log in
How to organize resource preprocessing in a gradle project under eclipse?
I decided to try to use gradle in my new project, the IDE chose the eclipse I was used to, installed the Gradle IDE plugin.
In projects with maven, it is possible to replace values in resource files from pom file properties. There is something like this in gradle
processResources {
filesMatching('**/logback.groovy') {
filter {
it.replace('${logback.loglevel}', logbackLoglevel)
}
}
}
Answer the question
In order to leave comments, you need to log in
In my project, I just copied resources from different directories for dev and prod environments.
I have a web application and on my machine (dev environment) I run it using the appRun task, courtesy of the gretty plugin. And I needed to put a configuration file in the assembly. Did it like this:
task copyDev (type: Copy) {
from ("work/dev")
into("build/resources/main")
}
...
project.afterEvaluate {
project.tasks.appRun.dependsOn copyDev
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question