Script plugins aren’t currently affected by the buildscript section of the build scripts they get applied to. (Actually, it’s questionable whether subproject build scripts should be affected by the buildscript sections of parent build scripts, even though that’s the way it currently is.) What you can do is to move the reusable parts of the buildscript section into its own script plugin:
gradle/buildscript.gradle:
repositories {
maven {
// from gradle.properties
url nexusDependencies
}
}
dependencies {
classpath "com.inxmail:gradle-nsis-plugin:0.0.1-SNAPSHOT"
}
You can then include this code in any buildscript section that requires it: client/gradle/distribution.gradle:
buildscript {
apply from: "$rootProject.projectDir/gradle/buildscript.gradle", to: buildscript
}
This might get revised at some point, but it’s too early to tell.