https://kotlinlang.org logo
Title
j

John Peña

04/21/2020, 5:25 PM
i recently removed some classpath dependencies from my buildscript section, maybe that's the issue?
o

octylFractal

04/21/2020, 5:26 PM
are you using
build.gradle.kts
?
j

John Peña

04/21/2020, 5:27 PM
no, i'm using groovy
o

octylFractal

04/21/2020, 5:28 PM
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

John Peña

04/21/2020, 5:34 PM
looks like you're right
here's what i see:
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

octylFractal

04/21/2020, 5:35 PM
hmm, implementation is in that list
not sure what's going on then, sorry
j

John Peña

04/21/2020, 5:37 PM
ok, thanks for your help
here's the build.gradle for the record: http://dpaste.com/271NRAH
o

octylFractal

04/21/2020, 5:37 PM
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

John Peña

04/21/2020, 5:38 PM
ah ok
i think i'm missing the java plugin in a subproject
o

octylFractal

04/21/2020, 5:39 PM
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

John Peña

04/21/2020, 5:40 PM
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

octylFractal

04/21/2020, 5:41 PM
I don't think that's quite true, it's just recommended to use the
plugins {}
block where possible
j

John Peña

04/21/2020, 5:41 PM
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

octylFractal

04/21/2020, 5:42 PM
I don't think so
j

John Peña

04/21/2020, 5:45 PM
ok, well this helped me get past my issue
thanks again for your help!