I have a little bit of a chicken/egg scenario I’d like some insight on. I’ve done a lot of experiments and nothing seems to be working (I won’t detail all of them here unless it becomes necessary).
Suffice to say, I’ve got a multi-project as an included build in a composite which can be “simplified” to something like this:
Root-Composite
|
|__Root-library-multiproject
| |_____________jvm-subproject
| |______________buildAssets task (processResources depends on this)
|
|__Root-downsteam-app-multiproject
|_____________jvm-subproject
| |______________buildAssets task (processResources depends on this)
|
|__buildutils (also included build)
The idea is to use some code to call into a texture packer that is a module/sub-project in the library multiproject for all buildAssets tasks. I’ve put the calling code into the buildutils included build (with a build dependency on the submodules needed in the library included build) and by the time say, the library is ready to process resources, it /should/ be able to pull the onto a classpath for a javaexec task I think?
Originally I tried including the main and calling code in buildutils (included build side-by-side with the two other included builds), get this code on my buildscript classpath, and use it there, but for other reasons/probably user errors, I can’t get it to resolve at all.
The solution I have right now is, via cross-configuration inside these two included builds (library and downstream app), I create a buildutils configuration and then declare a buildutils dependency on the buildutils included build.
It was working this morning, entering into the buildutils included build main and throwing the exception I put there to confirm it. Then, suddenly it started throwing exceptions about not being able to see main it should be finding in the buildutils configuration, when I had made no changes to buildutils included-build nor to the javaexec main class declaration that pertain to classpath.
My only thought is that I’m kind of doing something totally unsupported, and maybe it only worked before bc of some caching at some level/layer?
I’m trying to work through the usual culprits right now (is buildutils included build module being substituted with the project correctly? though I think given the results I can already rule that out).
If there’s a better way to solve this issue in terms of approach, I’m all ears.
Also, I’m not sure if this is corruption or something, but around the same time I started experiencing some strange stuff in my composite root settings file. In there, if there isn’t a property declared via gradle properties chain (val SOME_PROP: String? by settings), my code will throw an exception. I commented out the only thing that could be providing this prop (declared in gradle.properties), and it still executed without throwing the exception. Not sure if gradle.properties are cached in some way? I’m using Intellij IDEA Ultimate.
I am currently on gradle-4.10-rc-3-all (Kotlin-DSL 1.0 RC3), Kotlin plugin in IDE is 1.2.61-release-IJ2018.2-1