Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 119 for RuleSource (0.29 sec)

  1. platforms/native/testing-native/src/main/java/org/gradle/nativeplatform/test/plugins/NativeBinariesTestPlugin.java

    import org.gradle.language.nativeplatform.DependentSourceSet;
    import org.gradle.model.Defaults;
    import org.gradle.model.Each;
    import org.gradle.model.Finalize;
    import org.gradle.model.ModelMap;
    import org.gradle.model.RuleSource;
    import org.gradle.model.internal.registry.ModelRegistry;
    import org.gradle.model.internal.type.ModelTypes;
    import org.gradle.nativeplatform.internal.NativeBinarySpecInternal;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/UnmanagedElementIntegrationTest.groovy

    class UnmanagedElementIntegrationTest extends AbstractIntegrationSpec {
    
        def "can view unmanaged element as ModelElement"() {
            given:
            buildFile << '''
    class Thing { }
    
    class Rules extends RuleSource {
        @Model
        Thing thing() {
            return new Thing()
        }
    
        @Mutate
        void tasks(ModelMap<Task> tasks, @Path("thing") ModelElement thing) {
            tasks.create("show") {
                doLast {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  3. platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/registry/ModelReferenceNode.java

     */
    
    package org.gradle.model.internal.registry;
    
    import com.google.common.base.Optional;
    import com.google.common.base.Predicate;
    import org.gradle.internal.Cast;
    import org.gradle.model.RuleSource;
    import org.gradle.model.internal.core.InstanceModelView;
    import org.gradle.model.internal.core.ModelAction;
    import org.gradle.model.internal.core.ModelActionRole;
    import org.gradle.model.internal.core.ModelAdapter;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  4. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/managed/ManagedTypeImplementationClassCachingSpec.groovy

            buildScript '''
                @Managed
                interface Named {
                    String getName()
                    void setName(String name)
                }
    
                class RulePlugin extends RuleSource {
                    @Model
                    void first(Named first) {
                    }
    
                    @Model
                    void second(Named second) {
                    }
    
                    @Mutate
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2K bytes
    - Viewed (0)
  5. subprojects/core/src/integTest/groovy/org/gradle/api/PluginApplicationErrorIntegrationTest.groovy

            failure.assertHasCause("Failed to apply plugin class 'BrokenPlugin'")
            failure.assertHasCause("throwing plugin")
        }
    
        def "cannot apply a plugin that does not implement Plugin and does not extend RuleSource"() {
            buildFile << '''
    apply plugin: BrokenPlugin
    
    class BrokenPlugin {
        void apply(Project target) {
        }
    }
    '''
    
            when:
            fails()
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 01 03:07:53 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  6. platforms/software/platform-base/src/integTest/groovy/org/gradle/language/base/CustomManagedBinaryIntegrationTest.groovy

            buildFile << """
            class MySamplePlugin implements Plugin<Project> {
                void apply(final Project project) {}
    
                static class Rules extends RuleSource {
                    @ComponentType
                    void register(TypeBuilder<SampleBinary> builder) {
                    }
    
                    @Mutate
                    void createSampleBinary(BinaryContainer binaries) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/managed/UnmanagedCollectionPropertyIntegrationTest.groovy

                Set<Widget> getItems()
                void setItems(Set<Widget> s)
    
                @Unmanaged
                List getRawWidgets()
                void setRawWidgets(List l)
            }
    
            class Rules extends RuleSource {
                @Model
                void createContainer(Container c) {
                    c.items = []
                    c.widgets = []
                    c.rawWidgets = []
                }
    
                @Mutate
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  8. subprojects/core/src/integTest/groovy/org/gradle/api/PluginDetectionIntegrationTest.groovy

                class MyPlugin implements Plugin {
                    void apply(project) {
                      project.tasks.create("imperative-sentinel")
                    }
    
                    static class Rules extends RuleSource {
                        @Model String thing() {
                            "foo"
                        }
                    }
                }
            """
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 02 18:26:28 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  9. platforms/documentation/docs/src/snippets/modelRules/basicRuleSourcePlugin/groovy/build.gradle

    
    // tag::managed-type-plugin-and-dsl[]
    // tag::managed-type-and-plugin[]
    // tag::managed-type[]
    }
    // end::managed-type[]
    
    // tag::rule-source-plugin[]
    class PersonRules extends RuleSource {
    // tag::create-rule[]
      @Model void person(Person p) {}
    // end::create-rule[]
    
    // tag::plugin-mutate-rule[]
      //Create a rule that modifies a Person and takes no other inputs
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  10. platforms/software/platform-base/src/main/java/org/gradle/platform/base/BinaryTasks.java

     *
     * class MyCustomBinaryCreationTask extends DefaultTask {
     *      {@literal @}TaskAction void build() {
     *          //building the binary
     *      }
     * }
     *
     * class MyCustomBinariesPlugin extends RuleSource {
     *     {@literal @}ComponentType
     *     void register(TypeBuilder&lt;SampleBinary&gt; builder) {}
     *
     *     {@literal @}BinaryTasks
     *     void createBinaryTasks(ModelMap&lt;Task&gt; tasks, SampleBinary binary) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top