Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 119 for RuleSource (0.54 sec)

  1. platforms/core-configuration/model-core/src/main/java/org/gradle/model/RuleSource.java

     * <li>Instance variables are not allowed.</li>
     * <li>Non-final static variables are not allowed (i.e. constants are allowed).</li>
     * <li>Methods cannot be overloaded.</li>
     * <li>Implementations cannot be generic (i.e. cannot use type parameters).</li>
     * </ul>
     */
    @Incubating
    public class RuleSource {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/inspect/OuterClass.java

            private static String foo;
        }
    
        public static class InnerPublicStaticClass extends RuleSource {
        }
    
        public static class HasExplicitDefaultConstructor extends RuleSource {
            public HasExplicitDefaultConstructor() {
            }
        }
    
        public static class HasStaticFinalField extends RuleSource {
            private static final Object VALUE = null;
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  3. platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/inspect/ModelRuleSourceDetector.java

        public Iterable<Class<? extends RuleSource>> getDeclaredSources(Class<?> container) {
            try {
                return FluentIterable.from(cache.get(container))
                        .transform(new Function<Reference<Class<? extends RuleSource>>, Class<? extends RuleSource>>() {
                            @Override
                            public Class<? extends RuleSource> apply(Reference<Class<? extends RuleSource>> input) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 17 00:47:05 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  4. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/inspect/RuleDefinitionRuleExtractorTest.groovy

        static class InvalidSignature extends RuleSource {
            @Rules
            void broken1(String string, RuleSource ruleSource) {
            }
    
            @Rules
            void broken2() {
            }
    
            @Rules
            String broken3(String string) {
                "broken"
            }
        }
    
        def "rule method must have first parameter that is assignable to RuleSource and have void return type"() {
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  5. platforms/documentation/docs/src/docs/userguide/legacy/rule_source.adoc

    A plugin can define rules by extending link:{javadocPath}/org/gradle/model/RuleSource.html[RuleSource] and adding methods that define the rules. The plugin class can either extend link:{javadocPath}/org/gradle/model/RuleSource.html[RuleSource] directly or can implement link:{javadocPath}/org/gradle/api/Plugin.html[Plugin] and include a nested link:{javadocPath}/org/gradle/model/RuleSource.html[RuleSource] subclass.
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  6. platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/inspect/RuleDefinitionRuleExtractor.java

    import java.util.Collections;
    import java.util.List;
    
    public class RuleDefinitionRuleExtractor extends AbstractAnnotationDrivenModelRuleExtractor<Rules> {
        private static final ModelType<RuleSource> RULE_SOURCE_MODEL_TYPE = ModelType.of(RuleSource.class);
    
        @Nullable
        @Override
        public <R, S> ExtractedModelRule registration(MethodRuleDefinition<R, S> ruleDefinition, MethodModelRuleExtractionContext context) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/inspect/ModelRuleSourceDetectorTest.groovy

            static class SourceOne extends RuleSource {}
    
            static class SourceTwo extends RuleSource {}
    
            static class NotSource {}
        }
    
        static class IsASource extends RuleSource {
        }
    
        static class SourcesNotDeclaredAlphabetically {
            static class B extends RuleSource {}
    
            static class A extends RuleSource {}
        }
    
        def "find model rule sources - #clazz"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 3K bytes
    - Viewed (0)
  8. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/RuleSourceAppliedToModelMapElementIntegrationTest.groovy

                    }
                }
    
                class EchoRules extends RuleSource {
                    @Mutate
                    void mutateEcho(Task echo, String message) {
                        echo.message = message
                    }
                }
    
                class Rules extends RuleSource {
                    @Model
                    String message() {
                        "foo"
                    }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  9. subprojects/core-api/src/main/java/org/gradle/api/artifacts/ComponentSelectionRules.java

         *
         * The ruleSource provides the rule as exactly one rule method annotated with {@link org.gradle.model.Mutate}.
         *
         * This rule method:
         * <ul>
         *     <li>must return void.</li>
         *     <li>must have {@link org.gradle.api.artifacts.ComponentSelection} as its parameter.</li>
         * </ul>
         *
         * @param ruleSource an instance providing a rule implementation
         * @return this
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 31 08:53:53 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  10. platforms/software/platform-base/src/integTest/groovy/org/gradle/language/base/CustomBinaryTasksIntegrationTest.groovy

        def "setup"() {
            buildFile << """
            @Managed interface SampleLibrary extends GeneralComponentSpec {}
            @Managed interface SampleBinary extends BinarySpec {}
    
            class MyComponentBasePlugin extends RuleSource {
                @ComponentType
                void registerLibrary(TypeBuilder<SampleLibrary> builder) {
                }
    
                @ComponentType
                void registerBinary(TypeBuilder<SampleBinary> builder) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 9.2K bytes
    - Viewed (0)
Back to top