Slackbot
03/18/2023, 3:08 PMVampire
03/18/2023, 3:57 PMAdam
03/18/2023, 4:00 PMVampire
03/18/2023, 4:02 PMVampire
03/18/2023, 4:02 PMAdam
03/18/2023, 4:04 PMimplementation("dev.adamko.dokkatoo:dokkatoo-plugin:0.0.4")
in buildSrc (or included plugin build) you’ll get an error, because some of the classes extend from dokka-core (which is the 3rd party lib)Vampire
03/18/2023, 4:05 PMVampire
03/18/2023, 4:05 PMAdam
03/18/2023, 4:08 PMProperty<SomeDokkaCoreClass>
requires a dependency on dokka-core.
I really want to prevent this from happening again by segregating the source sets, so that one is private and has a dependency on dokka-core, but another is public and has no dokka-core dependencyVampire
03/18/2023, 4:11 PMAdam
03/18/2023, 4:12 PMAdam
03/18/2023, 4:13 PMAdam
03/18/2023, 4:18 PMWhat error exactly?
> Task :buildSrc:compileKotlin FAILED
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class dev.adamko.dokkatoo.dokka.parameters.DokkaSourceSetSpec, unresolved supertypes: org.jetbrains.dokka.DokkaConfigurationBuilder
Adding -Xextended-compiler-checks argument might provide additional information.
e: /projects/x/buildSrc/src/main/kotlin/buildsrc/convention/dokkatoo.gradle.kts: (21, 5): Cannot access 'org.jetbrains.dokka.DokkaConfigurationBuilder' which is a supertype of 'dev.adamko.dokkatoo.dokka.parameters.DokkaSourceSetSpec'. Check your module classpath for missing or conflicting dependencies
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':buildSrc:compileKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
Vampire
03/18/2023, 4:25 PMAdam
03/18/2023, 4:25 PMAdam
03/18/2023, 4:26 PMVampire
03/18/2023, 4:26 PMAdam
03/18/2023, 4:27 PMVampire
03/18/2023, 4:29 PMcompileKotlin
that fails.
So yeah, applying with ID then of course does not have that problem.Vampire
03/18/2023, 4:31 PMAdam
03/18/2023, 4:31 PMimplementation("dokka-core")
to compileOnly("dokka-core")
Vampire
03/18/2023, 4:32 PMChris Lee
03/18/2023, 4:32 PMVampire
03/18/2023, 4:32 PMI think I just need to changeDidn't you say it is a compile only dependency?toimplementation("dokka-core")
compileOnly("dokka-core"
Adam
03/18/2023, 4:33 PMVampire
03/18/2023, 4:33 PM^^^ have used archunit for exactly that.Ah, yeah, tried to remember that name, thanks 🙂
Vampire
03/18/2023, 4:33 PMI thought it was, but I was mistaken 🙂But it wouldn't change anything, would it? As long as you don't make it
api
, it will not be in the compile classpath of the consumer and thus give that error on compilationAdam
03/18/2023, 4:34 PMAdam
03/18/2023, 4:35 PMand thus give that error on compilationI want an error on compilation! The X classes should only be used by the Worker API at runtime, which has an isolated classpath which contains X
Chris Lee
03/18/2023, 4:36 PMArchUnit gives me nightmares of working with someone who took ‘defensive programming’ to it’s absolute extreme maximum 😬like any tool it can certainly be abused. If used selectively to enforce constraints that’s fine; if it becomes pedantic, well…
Adam
03/18/2023, 4:38 PMI want an error on compilation!or maybe I don’t… I’m getting lost
Vampire
03/18/2023, 6:44 PMVampire
03/18/2023, 6:45 PMVampire
03/18/2023, 6:47 PM