Hello, I'm using composite builds to locally work ...
# gradle
o
Hello, I'm using composite builds to locally work on project
B
from
A
.
B
includes several subprojects and I'd like to include one, say
subproject
, as a dependency in
A
Is there any way to do this nicely with composite builds, what would my alternatives be if there isn't?
o
I've tried substituting but something like
Copy code
substitute(module("<http://my.org:subproject|my.org:subproject>")).with(project(":subproject"))
doesn't get resolved when doing
Copy code
implementation("<http://my.org:subproject|my.org:subproject>")
Though apart from that, it builds fine. The following works totally fine however:
Copy code
substitute(module("<http://my.org:somerandomname|my.org:somerandomname>")).with(project(":"))

//in build.gradle
implementation("<http://my.org:somerandomname|my.org:somerandomname>")
o
not sure, it's worked for me before -- double-check for typos I guess?
o
I've been looking for quite a while now haha, perhaps it's a bug? I'm on 6.5.1, maybe someone else could try to reproduce locally. Maybe this just isn't supported or I'm declaring the dependency wrong. (edit: oh sorry didn't see you said it's worked for you before... huh)
o
works fine
o
I'll look through and triple check everything, also going to link to my exact files in a bit
o
curious, do you have B cloned as
Idofront
or
idofront
?
the repo states capital-I, but your
includeBuild
call is lowercase-i
o
ooh that's a good question
It is capitalized, I'll try changing that locally
Same issue persists
o
works for me
needed to drop
githubPackages
otherwise it crashed though
Copy code
+--- com.mineinabyss:idofront -> project :Idofront
\--- com.mineinabyss:idofront-annotation -> project :Idofront:annotation
o
Ugh probably something to do with cache then, I'll try clearing that
Hmm doesn't seem like that did anything... Also, the github package block doesn't work since it requires github access tokens in your properties (it's really stupid they made a public repo that requires credentials)
o
yea, I really don't know what could be wrong, seems like something on your end, if you feel comfortable doing so you could upload a
--scan
o
I'm actually unfaimiliar with gradle scans. Perhaps you have some ideas as to what I could try clearing, I just deleted
~/.gradle/caches
, forget what else there is
o
maybe run
./gradlew clean
to clean up your local build dirs
besides that there's not too much else caching-wise
o
Oh I finally got it! Had to set the source and target compatibility for java, it was confused about dependencies for :compileJava. Not too sure about the details, I guess it may have not occured on your computer because there was only one version of Java, at least that's the case for my laptop where it worked.