Hey, I may be misunderstanding what you want to do, but make sure you do not change the version string in mods.toml.
It should be: version="${file.jarVersion}"
That string will be auto-replaced by gradle.
In build.gradle under jar/manifest/attributes, you can set "Implementation-Version" to "project.version".
e.g.
"Implementation-Version": project.version,
This should be enough for gradle to pull the version from the Jar Metadata.
Note: If you are running from Eclipse your Mod's Version may display as "NONE", that's fine. When you actually create a jar for your mod, for instance with the "build/jar" Gradle Task. That jar should have a valid version when you drop it into a "mods" folder.