PR to remove magic numbers

(Jared Burrows) #1

There are plenty of sourceCompatibility and targetCompatibility with hardcoded numbers.

Can I make a PR to use the JavaVersion class?

(Mark Vieira) #2

Hmm, I don’t have strong feelings about this other than "1.6" is typically easier to digest than JavaVersion.VERSION_1_6 when reading a build script and is more in-line with a declarative DSL.

(Jared Burrows) #3

@mark_vieira Alright. I was thinking that the hard coded numbers were in there before the JavaVersion class was created.

(Mark Vieira) #4

This is likely the case although I think relying on enum coercion in build scripts is still more idiomatic.