Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 57 for MyTask (0.11 sec)

  1. subprojects/composite-builds/src/integTest/groovy/org/gradle/integtests/composite/CompositeBuildTaskExecutionIntegrationTest.groovy

            file('other-build/settings.gradle') << "rootProject.name = 'other-build'"
            file('other-build/build.gradle') << """
                tasks.register('doSomething', MyTask)
    
                class MyTask extends DefaultTask {
                    private String content = 'default content'
    
                    @Option(option = "content", description = "Message to print")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 24 06:54:47 UTC 2023
    - 12.8K bytes
    - Viewed (0)
  2. subprojects/core-api/src/main/java/org/gradle/api/Task.java

     * org.gradle.api.tasks.TaskContainer#create(String)} creates an empty task with the given name. You can also use the
     * {@code task} keyword in your build file: </p>
     * <pre>
     * task myTask
     * task myTask { configure closure }
     * task myTask(type: SomeType)
     * task myTask(type: SomeType) { configure closure }
     * </pre>
     *
     * <p>Each task has a name, which can be used to refer to the task within its owning project, and a fully qualified
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 30 17:25:12 UTC 2024
    - 31.6K bytes
    - Viewed (0)
  3. platforms/jvm/language-java/src/integTest/groovy/org/gradle/api/tasks/JavaToolchainBuildOperationsIntegrationTest.groovy

                }.get().executablePath)
    
                task myTask {
                    doLast {
                        println "Hello from \${name}"
                    }
                }
            """
    
            when:
            withInstallations(jdkMetadata).run(":myTask")
            def events = toolchainEvents(":myTask")
    
            then:
            events.size() == 0
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 04 06:42:07 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  4. platforms/documentation/docs/src/docs/userguide/troubleshooting/validation_problems.adoc

    To fix this problem, you should either make your property final and remove the setter:
    
    ```groovy
    class MyTask extends DefaultTask {
        @Input
        final Property<Integer> getX() = ...
    ```
    
    You can also rely on Gradle's built-in capacity to inject final properties:
    
    ```groovy
    abstract class MyTask {
        abstract Property<Integer> getX()
    }
    ```
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Mar 23 22:37:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  5. platforms/documentation/docs/src/docs/userguide/reference/command_line_interface.adoc

    To execute a task called `myTask` on the root project, type:
    
    ----
    $ gradle :myTask
    ----
    
    This will run the single `myTask` and all of its <<tutorial_using_tasks.adoc#sec:task_dependencies,dependencies>>.
    
    [[sec:disambiguate_task_options_from_built_in_options]]
    === Specify options for tasks
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 23 05:36:09 UTC 2024
    - 34.8K bytes
    - Viewed (0)
  6. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r68/CompositeBuildTaskExecutionCrossVersionSpec.groovy

            file('other-build/settings.gradle') << "rootProject.name = 'other-build'"
            file('other-build/build.gradle') << """
                tasks.register('doSomething', MyTask)
    
                class MyTask extends DefaultTask {
                    private String content = 'default content'
    
                    @Option(option = "content", description = "Message to print")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 16 10:10:39 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  7. platforms/software/ivy/src/integTest/groovy/org/gradle/api/publish/ivy/IvyPublishArtifactCustomizationIntegTest.groovy

        }
    
        def "can attach an arbitrary task provider as an artifact if it has a single output file"() {
            createBuildScripts("""
                def customTask = tasks.register("myTask") {
                    def buildDir = buildDir
                    outputs.file("\${buildDir}/output.txt")
                    def outputFile = file("\${buildDir}/output.txt")
                    doLast {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 14:02:46 UTC 2023
    - 18.3K bytes
    - Viewed (0)
  8. subprojects/diagnostics/src/integTest/groovy/org/gradle/api/tasks/diagnostics/TaskReportTaskIntegrationTest.groovy

        }
    
        def "renders only tasks in given group running [tasks, --group=build setup]"() {
            settingsFile << "rootProject.name = 'test'"
            buildFile << """
                task mytask {
                    group = "custom"
                }
            """
            when:
            succeeds "tasks", "--group=build setup"
    
            then:
            output.contains("""
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 15:00:02 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  9. platforms/core-configuration/configuration-cache/src/integTest/groovy/org/gradle/internal/cc/impl/ConfigurationCacheValueSourceIntegrationTest.groovy

                    }
                }
    
                abstract class MyTask extends DefaultTask {
                    @Input
                    abstract Property<String> getGreeting()
    
                    @TaskAction void run() { println greeting.get() }
                }
    
                def greetValueSource = providers.of(GreetValueSource) {}
                tasks.register("greet", MyTask) {
                    greeting = greetValueSource
                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  10. platforms/core-execution/workers/src/integTest/groovy/org/gradle/workers/internal/WorkerExecutorIntegrationTest.groovy

                }
            """
            file('build-logic/src/main/groovy/MyTask.groovy') << """
                import org.gradle.api.*
                import org.gradle.api.file.*
                import org.gradle.api.tasks.*
                import org.gradle.workers.*
                import javax.inject.Inject
    
                abstract class MyTask extends DefaultTask {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 06 13:00:39 UTC 2024
    - 31K bytes
    - Viewed (0)
Back to top