i recently removed some classpath dependencies fro...
# gradle
j
i recently removed some classpath dependencies from my buildscript section, maybe that's the issue?
o
are you using
build.gradle.kts
?
j
no, i'm using groovy
o
then it sounds like the `java`/`kotlin`/etc. plugin is no longer applied, and there is no
implementation
configuration any more you could check by putting
configurations.each { println(it.name) }
right before the dependency block
j
looks like you're right
here's what i see:
Copy code
annotationProcessor
api
apiDependenciesMetadata
apiElements
archives
compile
compileClasspath
compileOnly
compileOnlyDependenciesMetadata
default
implementation
implementationDependenciesMetadata
kotlinCompilerClasspath
kotlinCompilerPluginClasspath
kotlinNativeCompilerPluginClasspath
kotlinScriptDef
kotlinScriptDefExtensions
runtime
runtimeClasspath
runtimeElements
runtimeOnly
runtimeOnlyDependenciesMetadata
sourceArtifacts
testAnnotationProcessor
testApi
testApiDependenciesMetadata
testCompile
testCompileClasspath
testCompileOnly
testCompileOnlyDependenciesMetadata
testImplementation
testImplementationDependenciesMetadata
testKotlinScriptDef
testKotlinScriptDefExtensions
testRuntime
testRuntimeClasspath
testRuntimeOnly
testRuntimeOnlyDependenciesMetadata
o
hmm, implementation is in that list
not sure what's going on then, sorry
j
ok, thanks for your help
here's the build.gradle for the record: http://dpaste.com/271NRAH
o
oh, I see what's up -- you're printing the configurations of the root project, but trying to apply dependencies in the subprojects
you need to apply the java + kotlin plugins to the subprojects as well
j
ah ok
i think i'm missing the java plugin in a subproject
o
be wary that the root build.gradle is also evaluated first, so even if you apply it in a subproject's build.gradle, it may not be applied yet in the root build.gradle unless you declare that the evaulation depends on the child project
j
it looks like i did actually have to do
apply plugin: 'java'
in the subprojects block
i had remove that, i'd heard it was deprecated
o
I don't think that's quite true, it's just recommended to use the
plugins {}
block where possible
j
got it
so if all subprojects use the same plugins, its not a bad practice to use
apply plugin: 'whatever'
in the subprojects block?
o
I don't think so
j
ok, well this helped me get past my issue
thanks again for your help!