Hello, when using composite build and develocity I...
# develocity
e
Hello, when using composite build and develocity I'm getting this error :
Copy code
^ Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
               public fun Settings.develocity(p0: DevelocityConfiguration.() -> Unit): Unit defined in org.gradle.kotlin.dsl
               public fun Test.develocity(p0: DevelocityTestConfiguration.() -> Unit): Unit defined in org.gradle.kotlin.dsl
What I have is : • build A include build B (
includeBuild(...)
) • both build A and B declare
develocity {
in their
build.gradle.kts
The build is fine if only build A declare
develocity {
c
iirc develocity is a Settings plugin, to be used in settings.gradle.kts.
e
Forgot to mention, when I use it in settings (build B) I get
Copy code
* Where:
Settings file '/Users/eboudrant/.../settings.gradle.kts' line: 64

* What went wrong:
Extension with name 'develocity' does not exist. Currently registered extension names: [ext]
c
Is it fully registered?
Copy code
plugins {
    id("com.gradle.develocity") version("3.19.2")
}

develocity {
    // configuration
}
e
yes
I mean it should, we're using an internal plugin to configure develocity, let me check when using develocity plugin direct
c
We also use an internal plugin to configure it - something like this:
Copy code
class SettingsPlugin : Plugin<Settings> {
    override fun apply(target: Settings): Unit =
        target.run {
            pluginManager.apply("org.gradle.toolchains.foojay-resolver-convention")
            pluginManager.apply("com.gradle.develocity")

            configure<DevelocityConfiguration> {
                buildScan {
                    publishing.onlyIf { System.getenv("CI") != null }
                    termsOfUseUrl = "<https://gradle.com/terms-of-service>"
                    termsOfUseAgree = "yes"
                }
            }

            enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
            enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
        }
}
👍 1