Hi,
we have developed our own gradle plugin to share commonly used logic across multiple project.
In order to use our plugin we use the following buildscript block
buildscript {
apply from: "../conf/repository.gradle"
repositories {
mavenLocal()
maven {
url nexusGradlePluginsUrl
}
}
dependencies {
classpath "myGroup:myModule:1.0"
}
}
plugins {
id "org.sonarqube" version "2.5"
}
apply plugin: 'org.myGradlePlugin'
As we have to apply this code in all projects, we wanted to put the buildscript block into a gradle-file (lets call it setupPlugins.gradle) and include it with apply from. But this wont work because bevor a plugins block you can’t have a anything else than a buildscript block.
I don’t want to apply sonarcube at all projects which use our plugin.
Any ideas how to reuse buildscript blocks?
Thank you in advance,
stdoubleu