Hi! I am still struggling a bit with our custom g...
# community-support
g
Hi! I am still struggling a bit with our custom gradle distribution initialization logic... I created a jar file with some extension logic, and added it to our gradle dist. then in the initialization script:
Copy code
gradle.projectsLoaded {
    rootProject.buildscript {
        dependencies {
            classpath(files("some-jar-path.jar"))
        }
    }
}

gradle.beforeSettings {
    // not sure why but the extension methods are not working here as they worked in "projectsLoaded" 
    buildscript.dependencies.add("classpath", files("some-jar-path.jar"))
}
now with this setup - things in the
build.gradle.kts
work fine - i can reach all the classes and extension methods i defined in the jar however in the
settings.gradle.kts
i have problems:
Copy code
rootProject.name = "some-project"

println("from settings.gradle.kts - ${MyDumbObject.someProperty}") // shows error: Unresolved reference: MyDumbObject
on the other hand for some reason this works:
Copy code
rootProject.name = "some-project"

buildscript {
    dependencies {
        // nothing added here
    }
}

println("from settings.gradle.kts - ${MyDumbObject.someProperty}") // no error
is there a way to make this work without including that
noop
block in the
settings.gradle.kts
?