Q:

What's the most elegant way to copy just one file with gradle

What's the most concise and most elegant and the shortest way to copy just one file AND rename it with gradle? 
So far I could think of just this:
copy {
    from projectDir
    into projectDir
    include '.env.template'
    rename '.env.template', '.env'
}

A:

You can simplify your CopySpec:
copy {
    from file('.env.template')
    into projectDir
    rename '.*', ' .env'
}

The from method accepts single File objects and, since only this one file is copied, the rename pattern can match any copied file. 
This way is simple and clean, but to follow the Gradle concept, you should consider using a Copy task, to maintain a clean cut between configuration and execution phase. 
Edit:
I just learned, that one can provide a closure for the rename method, so you could also use:
copy {
    // ...
    rename { '.env' }
}

