Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for roles (0.57 sec)

  1. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/RuleSourceAppliedByRuleMethodIntegrationTest.groovy

                    @Model
                    void p1(Thing t) {
                    }
    
                    @Rules
                    void rules(CalculateName rules, Thing t) {
                    }
                }
    
                class CalculateName extends RuleSource {
                    @Rules
                    void rules(SpecializeName rules, Thing t) {
                    }
                }
    
                class SpecializeName extends RuleSource {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 18.7K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/managed/ModelSetIntegrationTest.groovy

                }
    
                class Rules extends RuleSource {
                  @Model
                  void group(Group group, @Path("people") ModelSet<Person> people) {
                  }
                }
    
                apply type: Rules
            '''
    
            then:
            fails "tasks"
    
            and:
            failure.assertHasCause "Exception thrown while executing model rule: Rules#group"
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 18.9K bytes
    - Viewed (0)
  3. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/managed/InterfaceBackedManagedTypeIntegrationTest.groovy

            output.contains("name: before init configure after")
        }
    
        def "managed type implemented as interface can have generative getter default methods"() {
            when:
            file('buildSrc/src/main/java/Rules.java') << '''
                import org.gradle.api.*;
                import org.gradle.model.*;
    
                @Managed
                interface Person {
                    String getFirstName();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  4. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/ModelMapIntegrationTest.groovy

                }
            }
            apply plugin: Rules
            """
    
            expect:
            succeeds "validate"
        }
    
    
        def "can create a ModelMap of List<String>"() {
            buildFile << """
                class Rules extends RuleSource {
                    @Model void things(ModelMap<List<String>> things) { }
                }
                apply plugin: Rules
    
                model {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  5. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/managed/ManagedModelMapIntegrationTest.groovy

                }
    
                apply type: Rules
            '''
    
            then:
            fails "tasks"
    
            and:
            failure.assertHasDescription('A problem occurred configuring root project')
            failure.assertHasCause('Exception thrown while executing model rule: Rules#people(ModelMap<Person>) > create(foo)')
            failure.assertHasCause('broken')
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 13.5K bytes
    - Viewed (0)
  6. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/managed/ScalarTypesInManagedModelIntegrationTest.groovy

        }
    
        def "values of primitive types are boxed as usual when using java"() {
            when:
            file('buildSrc/src/main/java/Rules.java') << '''
                import org.gradle.api.*;
                import org.gradle.model.*;
    
                @Managed
                interface PrimitiveProperty {
                    Long getLongProperty();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 27.1K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/RuleSourceAppliedAsProjectPluginIntegrationTest.groovy

        }
    
        def "informative error message when two plugins declare model at the same path and model is already created"() {
            when:
            buildScript '''
                class MyPlugin {
                    static class Rules extends RuleSource {
                        @Model
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 11.7K bytes
    - Viewed (0)
  8. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/ModelRuleBindingFailureIntegrationTest.groovy

            failure.assertHasCause("There is a problem with model rule Plugin3.Rules#m(String).")
            failure.assertHasCause("""Type-only model reference of type java.lang.String (parameter 1) is ambiguous as multiple model elements are available for this type:
      - s1 (created by: Plugin1.Rules#s1())
      - s2 (created by: Plugin2.Rules#s2())""")
        }
    
        def "fails on incompatible by-type reference"() {
            given:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  9. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/model/managed/ManagedScalarCollectionsIntegrationTest.groovy

                    c.items.add 'bar'
                }
            }
    
            apply plugin: Rules
            """
    
            then:
            fails 'tasks'
    
            and:
            failure.assertHasCause "Attempt to modify a read only view of model element 'container.items' of type '$type<String>' given to rule Rules#tryToMutate(ModelMap<Task>, Container)"
    
            where:
            type << MANAGED_SCALAR_COLLECTION_TYPES
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  10. build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/rules/AbstractGradleViolationRule.groovy

     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package gradlebuild.binarycompatibility.rules
    
    import com.google.gson.Gson
    import com.google.gson.stream.JsonWriter
    import gradlebuild.binarycompatibility.AcceptedApiChange
    import gradlebuild.binarycompatibility.AcceptedApiChanges
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 04 14:00:46 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top