Slackbot
07/28/2022, 10:11 AMEli Graber
07/28/2022, 10:14 AMsettings.gradle.kts
buildscript, that provides function I can call that will add a repository?Vampire
07/28/2022, 10:33 AMpluginManagement.repositories
the implicit Gradle Plugin Portal repo was not suppressed, but that should be fixed with 7.5 iirc.Eli Graber
07/29/2022, 11:00 PMpluginManagement
with a settings plugin, but I'm having trouble setting up an extension for it.
I keep getting an error saying that ejsonSecretsFile must be set
, even though I'm setting the password
property in the extension in settings.gradle.kts
Vampire
07/29/2022, 11:07 PMEli Graber
07/29/2022, 11:10 PMVampire
07/29/2022, 11:12 PMEli Graber
07/29/2022, 11:37 PMEli Graber
07/29/2022, 11:47 PMaddGitHubPackagesRepoToPluginManagement {
owner = ...
}
I keep getting an error saying that it doesn't exist.
But if I do:
configure<GitHubPackagesPluginManagementRepoPlugin.Extension> {
owner = ...
}
Then it worksVampire
07/29/2022, 11:51 PMA function on the extension that will add the repository?
Exactly
Also, do I have to do something special to configure the extension by name
How do you apply it?
Eli Graber
07/29/2022, 11:55 PMgrossws
07/30/2022, 8:03 AMAlso, do I have to do something special to configure the extension by nameFor settings plugin, yes. Add an extension function with signature
fun Settings.addGitHubPackagesRepoToPluginManagement(configure: Action<in GitHubPackagesPluginManagementRepoPlugin.Extension>)
in the default packageEli Graber
07/31/2022, 2:15 AMgrossws
07/31/2022, 11:49 AMVampire
07/31/2022, 2:31 PMgrossws
07/31/2022, 2:33 PMVampire
07/31/2022, 3:12 PMProject
extension function which seems wrong.
Both, it being generated and also being taken there. 😕grossws
07/31/2022, 3:25 PMorg.gradle.kotlin.dsl.GradleEnterpriseKt
with public fun Settings.gradleEnterprise(GradleEnterpriseExtension.() -> Unit): Unit
and public val Settings.gradleEnterprise: GradleEnterpriseExtension
so I guess that the ones with Project
are generated the same way as for the project plugins and IDE finds them but not from settings buildscripts classpath. I had to add com.gradle.enterprise
manually to the dependencies for IDEA to show com.gradle:gradle-enterprise-gradle-plugin
in the External Libraries
.Vampire
07/31/2022, 4:12 PMorg.gradle.kotlin.dsl.GradleEnterpriseKt
by navigating to the extension from the settings script and using the breadcrumb toolbar in IntelliJ to navigate around the jar.
But still, afaik for settings script there should be no accessor generation at all,
and even if I do settings.gradleEnterprise { ... }
navigation takes me to the project accessor which does not make much sense.grossws
07/31/2022, 7:00 PMkotlinDslAccessorsReport
task prints them. And it seems same code collects all ExtensionAware
objects visible from project perspective.grossws
07/31/2022, 7:05 PMplugins {
id("com.gradle.enterprise") version "3.9"
}
gradle.rootProject {
val schema = serviceOf<ProjectSchemaProvider>().schemaFor(this)
schema.extensions.forEach { logger.lifecycle("ext: $it") }
}
produces
ext: ProjectSchemaEntry(target=org.gradle.api.Project, name=ext, type=org.gradle.api.plugins.ExtraPropertiesExtension)
ext: ProjectSchemaEntry(target=org.gradle.api.Project, name=buildScan, type=com.gradle.scan.plugin.BuildScanExtension)
ext: ProjectSchemaEntry(target=org.gradle.api.Project, name=gradleEnterprise, type=com.gradle.enterprise.gradleplugin.GradleEnterpriseExtension)
ext: ProjectSchemaEntry(target=org.gradle.api.artifacts.dsl.DependencyHandler, name=ext, type=org.gradle.api.plugins.ExtraPropertiesExtension)
ext: ProjectSchemaEntry(target=org.gradle.api.artifacts.dsl.RepositoryHandler, name=ext, type=org.gradle.api.plugins.ExtraPropertiesExtension)
grossws
07/31/2022, 7:18 PMafterEvaluate
I don't see my extension from settings plugin there, only genuine project-related ones (like version catalogs, extra properties for every ExtensionAware
, and project plugin extensions). So I would guess that it hails from some special handling for blessed `buildScan`/`gradleEnterprise` extensions.