Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for ComponentMetadataRule (0.27 sec)

  1. build-logic/dependency-modules/src/main/kotlin/gradlebuild.dependency-modules.gradle.kts

        private val moduleToKeep: Set<String>
    ) : ComponentMetadataRule {
        override fun execute(context: ComponentMetadataContext) {
            context.details.allVariants {
                withDependencies {
                    removeAll { !moduleToKeep.contains(it.name) }
                }
            }
        }
    }
    
    
    inline
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Jun 05 20:15:18 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  2. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/rules/ComponentAttributesRulesIntegrationTest.groovy

                def quality = Attribute.of("quality", String)
                configurations {
                    conf.attributes.attribute(quality, 'qa')
                }
    
                class AttributeRule implements ComponentMetadataRule {
                    Attribute targetAttribute
    
                    @javax.inject.Inject
                    public AttributeRule(Attribute attribute) {
                        targetAttribute = attribute
                    }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 15:10:53 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  3. platforms/documentation/docs/src/docs/userguide/dep-man/03-controlling-transitive-dependencies/component_metadata_rules.adoc

    Gradle enforces isolation of instances of `ComponentMetadataRule`.
    This means that all parameters must be `Serializable` or known Gradle types that can be isolated.
    
    In addition, Gradle services can be injected into your `ComponentMetadataRule`.
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 15:10:53 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  4. build-logic-commons/gradle-plugin/src/main/kotlin/gradlebuild.code-quality.gradle.kts

        }
    }
    
    val SourceSet.allGroovy: SourceDirectorySet
        get() = the<GroovySourceDirectorySet>()
    
    abstract class CodeNarcRule @Inject constructor(
        private val groovyVersion: String
    ) : ComponentMetadataRule {
        override fun execute(context: ComponentMetadataContext) {
            context.details.allVariants {
                withDependencies {
                    val isAtLeastGroovy4 = VersionNumber.parse(groovyVersion).major >= 4
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 13:09:36 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  5. platforms/core-configuration/kotlin-dsl-integ-tests/src/integTest/kotlin/org/gradle/kotlin/dsl/integration/GradleKotlinDslRegressionsTest.kt

                dependencies {
                   components.all(FixOksocialOutput::class.java)
                   implementation("com.baulsupp:oksocial-output:4.19.0")
                }
                open class FixOksocialOutput: ComponentMetadataRule {
                   override fun execute(context: ComponentMetadataContext) = context.details.run {
                      if (id.group == "com.baulsupp" && id.name == "oksocial-output") {
                          allVariants {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 29 07:57:29 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  6. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/DependencyManagementResultsAsInputsIntegrationTest.groovy

                    implementation 'composite-lib:composite-lib'
                }
    
                @CacheableRule
                abstract class ChangingAttributeRule implements ComponentMetadataRule {
                    final String attrValue
                    @Inject ChangingAttributeRule(String attrValue) { this.attrValue = attrValue }
                    void execute(ComponentMetadataContext context) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 22 19:04:04 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  7. platforms/documentation/docs/build.gradle

        // Because this is done directly by the plugin application logic, we can't use a ComponentMetadataRule to exclude it.
        // See: https://github.com/gradle/guides/blob/ba018cec535d90f75876bfcca29381d213a956cc/subprojects/gradle-guides-plugin/src/main/java/org/gradle/docs/samples/internal/SamplesDocumentationPlugin.java#L335
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 15:37:11 UTC 2024
    - 42K bytes
    - Viewed (0)
  8. platforms/documentation/docs/src/docs/userguide/releases/upgrading/upgrading_version_8.adoc

    [.multi-language-sample]
    ======
    .build-logic/src/main/kotlin/my-plugin.gradle.kts
    [source,kotlin]
    ----
    @CacheableRule
    abstract class AddDependenciesRule @Inject constructor(val dependencies: List<String>) : ComponentMetadataRule {
        override fun execute(context: ComponentMetadataContext) {
            listOf("compile", "runtime").forEach { base ->
                context.details.withVariant(base) {
                    withDependencies {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 17:01:07 UTC 2024
    - 90.7K bytes
    - Viewed (0)
  9. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/versions/VersionConflictResolutionIntegrationTest.groovy

                    conf 'org.test:root2:1.0'
                    conf 'org.test:root3:1.0'
    
                    components.all(AlignGroup.class)
                }
    
                class AlignGroup implements ComponentMetadataRule {
                    void execute(ComponentMetadataContext ctx) {
                        ctx.details.with { it ->
                            if (it.getId().getGroup().startsWith("org.aligned")) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 11:33:46 UTC 2024
    - 76.2K bytes
    - Viewed (0)
Back to top