I want to avoid redundancy and therefore I got one "shared" project that contains looks like this:
plugins {
id "org.flywaydb.flyway" version "4.2.0"
}
repositories {
mavenCentral()
jcenter()
}
apply plugin: "java"
dependencies {
compile "commons-io:commons-io:2.4"
// ...
}
Then I also have my regular projects that inherit the compile dependencies from my shared project like this:
apply plugin: "java"
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile project(":shared")
testCompile project(":shared")
}
Is there any way I can make my regular projects inherit the plugin block or the actual plugin as well?
Error:(57, 0) Could not find method plugins() for arguments [build_44j4lgef9ftzfeyhh4janhtfy$_run_closure3$_closure14@65b80565] on project ':core' of type org.gradle.api.Project."
So apparently one cannot use the plugins statement inside subprojects... – Materialism