I use lots of the 'buildscript' section in my Gradle scripts.

However, my Gradle scripts often use the same elements of the buildscript
classpath (plugins, common jar) and I would like to  externalize the'
builscript' section in a common Gradle script (called for example
'common.gradle') and use the apply url element with the 'common.gradle' as
value in the target Gradle build script.

Regarding my tests, that doesn't work.


Example 

In 'common.gradle':
buildscript {
  repositories {
   flatDir dirs: '.'
  }
  dependencies {
   classpath ':myjar:1.0'
  }
}
(and myjar has a main class com.example.App)

In a target Gradle script:

apply url:'common.gradle'
task test {
 println com.example.App.main(new String[0])
}

I think is quite difficult because the 'buildscript' section is evaluated
before the script evaluation (with the 'apply url' element).

Any suggestions?
-- 
View this message in context: 
http://old.nabble.com/%27builscript%27-section-%2B-%27apply-url%27-together-tp27720789p27720789.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


Reply via email to