So my issue is, I am working in a multi-project project, I have this plugin JsonSchema2Pojo and I need to use a custom annotator. To do this I need to add the annotator to the classpath for the plugin to pick up.
When I try to add it to the sub-projects build.gradle file it doesn’t seem to work, but when I add it to the root project’s build.gradle it does.
subproject:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath(files("libs/nqes-annotators.jar"))
classpath("org.jsonschema2pojo:jsonschema2pojo-gradle-plugin:1.0.0-alpha2")
classpath("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.9")
}
}
plugins {
id 'idea'
}
apply plugin: 'jsonschema2pojo'
rootproject
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath(files("nqes/model/libs/nqes-annotators.jar"))
classpath("org.jsonschema2pojo:jsonschema2pojo-gradle-plugin:1.0.0-alpha2")
classpath("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.9")
}
}
plugins {
id "nebula.metrics" version "7.0.2"
id "com.developerb.taskProfilingPlugin" version "0.2-SNAPSHOT"
// apply false are custom plugins that are not applied here but defined only to be able to use `apply plugin: ...` in other projects like before.
// eventually will go to each place and change it there, for now this helps with version control also plugins applied to allprojects{} can be applied differently.
id "org.owasp.dependencycheck" version "4.0.0" apply false
id "org.sonarqube" version "2.6.2" apply false
id "com.github.ben-manes.versions" version "0.15.0" apply false
id "com.github.jacobono.jaxb" version "1.3.5" apply false
id "org.springframework.boot" version "1.5.22.RELEASE" apply false
id "com.github.lkishalmi.gatling" version "0.7.3" apply false
id "org.jsonschema2pojo.gradle" version "1.0.0-alpha2" apply false
}
So how do I get the subproject to add to the classpath?