On 08/08/2011, at 9:06 AM, Evgeny Goldin wrote: > Yes, I'm aware of gradle wrapper but it needs to be explicitly invoked and > used. If not used - it enforces nothing, right? > Having a built-in version enforcer can make verification simpler and always > active.
Our plan at the moment is to use the wrapper to solve this problem. We want to change things so that the wrapper meta-data is always used however it is that you invoke Gradle - via 'gradle', or through the IDE, or the GUI, or './gradlew', or whatever. This would solve the problem, if somewhat awkwardly. We would then work on the usability a bit, so that it's easier to specify which version of Gradle to use. For example, we might: * make the 'wrapper' task built-in, so that you don't need to define it in your build script in order to use it. * expose the wrapper meta-data through the tooling API, so you can manage it through the IDE. * add some 'create-project' tasks (aka archetypes), which can setup the wrapper meta-data on project creation. * maybe even have Gradle create the wrapper file if they don't exist whenever it is invoked, so that Gradle just remembers what version the project was initially authored with. * maybe move the specification of Gradle version into the build script. This one is a little tricky, because we can't execute the script in order to figure out which version of Gradle to use to execute it, so we'd need some way to statically extract the version information. > > > > On Mon, Aug 8, 2011 at 01:37, enrico <[email protected]> wrote: > Hi, > I think, to achieve this result, you can use gradle wrapper > http://gradle.org/releases/1.0-milestone-3/docs/userguide/userguide_single.html#gradle_wrapper > > Regards, Enrico > > > On Mon, Aug 8, 2011 at 12:24 AM, evgenyg <[email protected]> wrote: > > Perl has a nice http://perldoc.perl.org/functions/use.html use directive > > to > > verify the current Perl version: "use v5.6.1;" > > > > With Gradle changes introduced in milestone-4 ("You should use the > > idea.project.jdkName". "You should use the idea.module.downloadSources". > > "You should use the idea.module.downloadJavadoc" ) which are not backward > > compatible with milestone-3 it probably makes sense to introduce a similar > > directive to Gradle. > > > > Something like > > > > apply gradle: '1.0-milestone-4' > > > > Similar to > > http://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html. > > > > This will make sure Gradle is at least of the version specified or newer, > > depends on how rigid the verification can be and if it allows > > http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html > > upper/lower bounds . It will also answer questions like "What Gradle version > > do I need to run this build" ? > > > > ----- > > Best regards, > > > > Evgeny > > > > evgeny-goldin.com > > > > -- > > View this message in context: > > http://gradle.1045684.n5.nabble.com/Verifying-Gradle-version-tp4675891p4675891.html > > Sent from the gradle-user mailing list archive at Nabble.com. > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com
