Hi,
I want to install some packages locally for all my projects, e.g. dependency-analyse. But I need to actually configure the plugin - also in the init schript.
initscript {
repositories {
repositories {
jcenter()
}
dependencies {
classpath "ca.cutterslade.gradle:gradle-dependency-analyze:1.3.0"
}
}
}
allprojects {
apply plugin: ca.cutterslade.gradle.analyze.AnalyzeDependenciesPlugin
}
This init script works fine and applys the plugin, but unfortunately the default setting is that the plugin fails the build. I would like to just log a warn.
For that I need to add configs:
analyzeClassesDependencies {
justWarn = true
}
analyzeTestClassesDependencies {
justWarn = true
}
but when I try to add it in the init.gradle file:
initscript {
repositories {
repositories {
jcenter()
}
dependencies {
classpath "ca.cutterslade.gradle:gradle-dependency-analyze:1.3.0"
}
}
allprojects {
apply plugin: ca.cutterslade.gradle.analyze.AnalyzeDependenciesPlugin
analyzeClassesDependencies {
justWarn = true
}
analyzeTestClassesDependencies {
justWarn = true
}
}
I get an error:
FAILURE: Build failed with an exception.
* Where:
Initialization script '/Users/<my-user>/.gradle/init.gradle' line: 13
* What went wrong:
Could not find method analyzeClassesDependencies() for arguments [init_2y9p9if69e8553k9fsvzz4a28$_run_closure1$_closure2@3e17c37a] on root project 'my-project' of type org.gradle.api.Project.
Anybody an idea how I can apply plugin configuration?