Best way to display project version string (from Gradle) in an HTML page

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Best way to display project version string (from Gradle) in an HTML page

Sean Gilligan
This post was updated on .
I want to create an "about" page for my Ratpack app that contains the version string from the Gradle build.

I searched around quite a bit actually and could not find any example of how to do this.

I tried the following:

build.gradle
processResources {
    expand projectVersion: project.version
}

combined with this:

ratpack.groovy
    serverConfig {
        props("version.properties")
        require('/app', VersionConfig)
    }

This works reasonably well, except when I try running ratpack.groovy directly from the IDE.

Any suggestions?
Loading...