hallo hans,
i put everything in plugins and it seems to work.
build.gradle now looks like this:
subprojects {
usePlugin('custom-groovy')
sourceCompatibility = 1.4
targetCompatibility = 1.4
group = 'com.mycompany'
version = '1.0'
}
for those who are interested in details:
*step 1*
i implemented a standalone project 'gradle-customizations'
with a gradle-build. this project contains following classes:
- com.mycompany.gradle.CustomPluginBase (implements Plugin)
- com.mycompany.gradle.CustomJavaPlugin (extends CustomPluginBase)
- com.mycompany.gradle.CustomGroovyPlugin (extends CustomPluginBase)
- com.mycompany.gradle.CustomWarPlugin (extends CustomPluginBase)
the customization-code defines mycompany-specific resolvers
(classpath, upload) and convention-settings.
*step 2*
i gradle-build 'gradle-customizations' and
copy the resulting jar to buildSrc/lib of
the gradle-builds, that want to use customizations.
*step 3*
i add the following lines to settings.gradle
of the gradle-builds, that want to use customizations:
addFlatDirResolver('lib', "$rootDir/buildSrc/lib")
dependencies(':gradle-customizations:1.0')
*step 4*
i add the following lines to $GRADLE_HOME/plugins.properties
custom-java=com.mycompany.gradle.CustomJavaPlugin
custom-groovy=com.mycompany.gradle.CustomGroovyPlugin
custom-war=com.mycompany.gradle.CustomWarPlugin
this is not DRY in steps 2 and 3. a solution of
this could be, that in the $HOME/.gradle/gradle.properties
there can be declared a resolver and source for
gradle-custom-extensions (plugins).
as always ... there might be even better solutions ;-)
have a successful day !
--
View this message in context:
http://www.nabble.com/common-resolver-setup-across-multiple-gradle-builds-tp19570795p19685243.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