Apply from: <relative-path> INSIDE multi-module project?

Build file '/home/varrix/repos/<redacted>/api/build.gradle' line: 2
A problem occurred evaluating project ':<redacted>-api'.
> Could not read script '/home/varrix/repos/org/gradle-super/bundles/something1.gradle' as it does not exist.

I’m attempting to apply from: file('../<external-scripts>/.../something1.gradle') but it cannot be found.

Project structure is:

repos/
    org/
        external-scripts/
            bundles/
                something1.gradle
                something2.gradle
                something3.gradle
                ...
        my-project/
            api/
                build.gradle
            common/
                build.gradle
            ...
            build.gradle (parent-script)

How can I approach a multi-module project? I need to apply external Gradle script plugins on the :api and have it trickle down into the :common etc…?

When you use relative paths, they are relative to the current working directory. So the path will be different depending on where you are invoking Gradle from (e.g. the root project or a sub-project).

So you probably just need to use absolute paths instead. You can construct those using project properties like rootDir and projectDir. So maybe something like file("$rootDir/../external-scripts/bundles/something1.gradle") will work?