ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
185 stars 28 forks source link

Issue with java9 modules #144

Closed ziccardi closed 2 years ago

ziccardi commented 3 years ago

I'm trying to configure my java9 project to use reckon. Everything works until I try to specify the module version using:

    tasks.compileJava {
        options.javaModuleVersion = provider { project.version }
    }

When I add that, I get the following error: property 'options.javaModuleVersion' of type java.lang.String as the provider associated with this property returned a value of type org.ajoberstar.reckon.gradle.ReckonPlugin$DelayedVersion

Any workaround?

Thank you!

ajoberstar commented 3 years ago

You'll need to call toString for this work.

tasks.compileJava {
  options.javaModuleVersion = provider { project.version.toString() }
}
ajoberstar commented 2 years ago

Closing under the assumption this is resolved. If that's not true and you want to discuss further, please reopen.