Building in each individual lecture’s directory is fine, e.g:
cd lec01 gradle
But building all lectures in the lecture root directory doesn’t work, because
build.gradle.kts tries to import
lecture.gradle.kts, which only exists in the lecture subdirectories.
The solution might be to make the lecture infrastructure a script plugin instead. Then instead of symlinks, each lecture can have its own small
build.gradle.kts that just declares the plugin, plus any custom build logic that currently goes in
build.gradle.kts would not declare the plugin, relying on the subprojects for that.