Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 60 for ComponentMetadataRule (0.32 sec)

  1. platforms/documentation/docs/src/snippets/dependencyManagement/managingTransitiveDependencies-declaringCapabilities/groovy/build.gradle

    // tag::declare_capability[]
    dependencies {
        // Activate the "LoggingCapability" rule
        components.all(LoggingCapability)
    }
    
    @CompileStatic
    class LoggingCapability implements ComponentMetadataRule {
        final static Set<String> LOGGING_MODULES = ["log4j", "log4j-over-slf4j"] as Set<String>
    
        void execute(ComponentMetadataContext context) {
            context.details.with {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  2. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/rules/VariantFilesMetadataRulesIntegrationTest.groovy

                ['org.gradle.jvm.version': 8, 'org.gradle.status': 'integration']
            }
        }
    
        def setup() {
            buildFile << """
                class MissingJdk8VariantRule implements ComponentMetadataRule {
                    String base
                    @javax.inject.Inject
                    MissingJdk8VariantRule(String base) {
                        this.base = base
                    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 28.1K bytes
    - Viewed (0)
  3. platforms/documentation/docs/src/snippets/dependencyManagement/managingTransitiveDependencies-declaringCapabilities/kotlin/build.gradle.kts

    }
    // end::use_highest_asm[]
    
    // tag::declare_capability[]
    dependencies {
        // Activate the "LoggingCapability" rule
        components.all(LoggingCapability::class.java)
    }
    
    class LoggingCapability : ComponentMetadataRule {
        val loggingModules = setOf("log4j", "log4j-over-slf4j")
    
        override
        fun execute(context: ComponentMetadataContext) = context.details.run {
            if (loggingModules.contains(id.name)) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  4. 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)
  5. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/rules/VariantAttributesRulesIntegrationTest.groovy

                }
            """
        }
    
        def "can add attributes"() {
            given:
            withDefaultVariantToTest()
            buildFile << """
                class AttributeRule implements ComponentMetadataRule {
                    Attribute attribute
    
                    @javax.inject.Inject
                    AttributeRule(Attribute attribute) {
                        this.attribute = attribute
                    }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  6. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/ConcurrentDerivationStrategyIntegTest.groovy

                }
    
                class NonCachedRule implements ComponentMetadataRule {
                    @Override
                    void execute(ComponentMetadataContext context) {
                        println("Applying rule on \$context.details.id")
                    }
                }
    
                @CacheableRule
                class CachedRule implements ComponentMetadataRule {
                    @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  7. platforms/software/dependency-management/src/main/java/org/gradle/internal/management/DefaultDependencyResolutionManagement.java

            }
    
            @Override
            public ComponentMetadataHandler all(Class<? extends ComponentMetadataRule> rule) {
                components(h -> h.all(rule));
                return this;
            }
    
            @Override
            public ComponentMetadataHandler all(Class<? extends ComponentMetadataRule> rule, Action<? super ActionConfiguration> configureAction) {
                components(h -> h.all(rule, configureAction));
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 12K bytes
    - Viewed (0)
  8. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/rules/AdditionalVariantsMetadataRulesIntegrationTest.groovy

            file("buildSrc/src/main/java/AddVariantRule.java") << """
                package com.example;
    
                import org.gradle.api.artifacts.ComponentMetadataContext;
                import org.gradle.api.artifacts.ComponentMetadataRule;
                import org.gradle.api.artifacts.ModuleVersionIdentifier;
                import org.gradle.api.attributes.Category;
                import org.gradle.api.attributes.DocsType;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Feb 28 16:23:01 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  9. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/ivy/IvyCustomStatusLatestVersionIntegrationTest.groovy

            given:
            buildFile << """
    repositories {
        ivy {
            url "${ivyRepo.uri}"
        }
    }
    
    class StatusRule implements ComponentMetadataRule {
        public void execute(ComponentMetadataContext context) {
            context.details.statusScheme = ["bronze", "silver", "gold", "platin"]
        }
    }
    
    configurations { compile }
    dependencies {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  10. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/DefaultComponentMetadataHandler.java

        }
    
        @Override
        public ComponentMetadataHandler all(Class<? extends ComponentMetadataRule> rule) {
            return addClassBasedRule(createAllSpecConfigurableRule(DefaultConfigurableRule.of(rule)));
        }
    
        @Override
        public ComponentMetadataHandler all(Class<? extends ComponentMetadataRule> rule, Action<? super ActionConfiguration> configureAction) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 16.2K bytes
    - Viewed (0)
Back to top