Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 162 for RuleSource (0.12 sec)

  1. subprojects/core/src/integTest/groovy/org/gradle/execution/taskgraph/RuleTaskBridgingIntegrationTest.groovy

        def "can view task container as various view types"() {
            given:
            buildFile << '''
                class MyPlugin extends RuleSource {
                    @Mutate
                    void applyMessages(ModelMap<Task> tasks) {
                        println "as map: $tasks"
                        assert tasks.get("tasks") != null
                    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 20 12:57:53 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  2. platforms/software/platform-base/src/integTest/groovy/org/gradle/language/base/CustomComponentPluginIntegrationTest.groovy

                class MyPlugin extends RuleSource {
                    @ComponentType
                    void register(TypeBuilder<UnmanagedComponent> builder) {
                        builder.defaultImplementation(DefaultUnmanagedComponent)
                    }
                }
                class MyOtherPlugin extends RuleSource {
                    @ComponentType
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  3. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/manage/schema/extract/RuleSourceSchemaExtractionStrategyTest.groovy

        def store = new DefaultModelSchemaStore(DefaultModelSchemaExtractor.withDefaultStrategies())
    
        def "assembles schema for RuleSource type"() {
            expect:
            def schema = store.getSchema(ModelType.of(RuleSource))
            schema instanceof RuleSourceSchema
            !(schema instanceof ManagedImplSchema)
            !(schema instanceof CompositeSchema)
            schema instanceof StructSchema
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  4. platforms/software/platform-base/src/integTest/groovy/org/gradle/language/base/CustomComponentBinariesIntegrationTest.groovy

        @Managed interface LibrarySourceSet extends LanguageSourceSet {}
    
        class MyBinaryDeclarationModel implements Plugin<Project> {
            void apply(final Project project) {}
    
            static class ComponentModel extends RuleSource {
                @ComponentType
                void registerLibrary(TypeBuilder<SampleLibrary> builder) {}
    
                @Mutate
                void createSampleComponentComponents(ModelMap<SampleLibrary> componentSpecs) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  5. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/managed/ScalarTypesInManagedModelIntegrationTest.groovy

                    void setLongPropertyFromInt(Long value)
    
                    Long getLongPropertyFromInteger()
                    void setLongPropertyFromInteger(Long value)
                }
    
                class RulePlugin extends RuleSource {
                    @Model
                    void createPrimitiveTypes(PrimitiveTypes primitiveTypes) {
                        primitiveTypes.longPropertyFromInt = 123
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 27.1K bytes
    - Viewed (0)
  6. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/inspect/ClassModelRuleSourceValidationTest.groovy

            OuterClass.DoesNotExtendRuleSource | "Rule source classes must directly extend org.gradle.model.RuleSource"
            OuterClass.HasSuperclass           | "Rule source classes must directly extend org.gradle.model.RuleSource"
        }
    
        def "valid #type"() {
            when:
            extractor.extract(type)
    
            then:
            noExceptionThrown()
    
            where:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/inspect/FormattingValidationProblemCollectorTest.groovy

            given:
            def collector = new FormattingValidationProblemCollector("<thing>", ModelType.of(String))
            collector.add("does not extend RuleSource")
    
            expect:
            collector.format() == 'Type java.lang.String is not a valid <thing>: does not extend RuleSource'
        }
    
        def "formats message with a single problem with a long message"() {
            given:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  8. subprojects/core/src/main/java/org/gradle/api/internal/plugins/RuleBasedPluginTarget.java

            ModelRegistry modelRegistry = target.getModelRegistry();
            Iterable<Class<? extends RuleSource>> declaredSources = ruleDetector.getDeclaredSources(clazz);
            for (Class<? extends RuleSource> ruleSource : declaredSources) {
                ExtractedRuleSource<?> rules = ruleInspector.extract(ruleSource);
                for (Class<?> dependency : rules.getRequiredPlugins()) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:42:21 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. platforms/software/platform-base/src/integTest/groovy/org/gradle/language/base/LanguageSourceSetIntegrationTest.groovy

        def "can not create a top level LSS for using an implementation class"() {
            buildFile.text = """
            ${registerCustomLanguageWithImpl()}
    
            class Rules extends RuleSource {
                @Model
                void lss(DefaultCustomSourceSet source) {
                }
            }
            apply plugin: Rules
            """
    
            when:
            fails "model"
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  10. platforms/documentation/docs/src/snippets/modelRules/ruleSourcePluginEach/groovy/build.gradle

        ModelMap<Item> getChildren()
    }
    
    class PluginRules extends RuleSource {
        @Defaults void setDefaultFileSize(@Each FileItem file) {
            file.size = 1024
        }
    
        @Rules void applyValidateRules(ValidateRules rules, @Each DirectoryItem directory)  {}
    }
    apply plugin: PluginRules
    
    abstract class ValidateRules extends RuleSource {
        @Validate
        void validateSizeIsPositive(ModelMap<FileItem> files) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.1K bytes
    - Viewed (0)
Back to top