James
06/05/2024, 2:21 PMbuild.gradle.kts file I want to add an enterprise plugin which is located in our internal repositories.
plugins {
id("my.enterprise.plugin") version "1.0.0"
}
In order to do that I need to add the repository in pluginManagement.repositories . But the issue here is that in order to add that repository I need to use a plugin:
pluginManagement {
plugins {
id("sh.tnn") version "0.3.3"
}
repositories {
github.use("myenterprise", "plugin") // github.use is added by sh.tnn
}
}
The problem is that the github extension is not found (it is definitely registered as an extension), but I fear that Kotlin / Gradle does not detect it early enough.
Any tips?ephemient
06/05/2024, 2:26 PMpluginManagement is evaluated before any plugins are applied, and I don't think that will ever change as it's a chicken-and-egg problemJames
06/05/2024, 2:29 PMpluginManagement ?ephemient
06/05/2024, 2:33 PMJames
06/05/2024, 2:33 PMJames
06/05/2024, 2:34 PMephemient
06/05/2024, 2:41 PMEric Haag
06/05/2024, 2:47 PMThey are useful for various purposes:
• Setting up enterprise-wide configurations (e.g., custom plugin locations)
• ...https://docs.gradle.org/current/userguide/init_scripts.html
Eric Haag
06/05/2024, 2:51 PM