I have a multi-project build that looks like this
talepath-poc-1
talepath-poc-1-backend
build.gradle
talepath-poc-1-ui
build.gradle
build.gradle
settings.gradle
settings.gradle
rootProject.name = 'talepath-poc-1'
include 'talepath-poc-1-backend'
include 'talepath-poc-1-ui'
talepath-poc-1
plugins {
id 'java'
}
group = 'com.lapots.breed'
allprojects {
group = 'com.lapots.breed'
}
subprojects {
version = '1.0-SNAPSHOT'
repositories {
jcenter()
}
}
talepath-poc-1-ui
plugins {
id 'org.gretty' version '2.3.1'
id 'com.devsoap.vaadin-flow' version '1.0.0.RC8'
}
repositories {
vaadin.repositories()
}
dependencies {
implementation project(":talepath-poc-1-backend")
implementation vaadin.core()
implementation vaadin.servletApi()
implementation vaadin.slf4j()
implementation "org.hibernate:hibernate-validator:5.4.1.Final"
implementation "org.vaadin.pekka:checkbox-group-java:1.0.0.alpha1"
implementation "javax.validation:validation-api:2.0.1.Final"
}
vaadin {
productionMode = true
}
talepath-poc-1-backend
dependencies {
implementation "javax.validation:validation-api:1.1.0.Final"
implementation "junit:junit:4.11"
}
But no matter what dependency I put into talepath-poc-1-backend project it always fails with the same exception for any dependency
Could not find method implementation() for arguments [*dependency*] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
While talepath-poc-1-ui works fine. What is the problem?
You have only applied your java plugin in the root project.
Apply it for all subprojects (I think it's useless for you to keep it in the root project) :
subprojects {
plugins {
id 'java'
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With