Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 579 for asFile (0.26 sec)

  1. platforms/jvm/plugins-java-base/src/integTest/groovy/org/gradle/api/plugins/JavaBasePluginTest.groovy

            def test = project.task('customTest', type: Test.class)
            test.workingDir == project.projectDir
            test.reports.junitXml.outputLocation.get().asFile == new File(project.testResultsDir, 'customTest')
            test.reports.html.outputLocation.get().asFile == new File(project.testReportDir, 'customTest')
            test.reports.junitXml.required.get()
            test.reports.html.required.get()
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 12:15:28 UTC 2023
    - 16.4K bytes
    - Viewed (0)
  2. platforms/documentation/docs/src/snippets/testing/patch-module/groovy/build.gradle

    }
    
    tasks.named('test') {
        useJUnitPlatform()
    }
    
    // tag::patchArgs[]
    def moduleName = "org.gradle.sample"
    def patchArgs = ["--patch-module", "$moduleName=${tasks.compileJava.destinationDirectory.asFile.get().path}"]
    tasks.named('compileTestJava') {
        options.compilerArgs += patchArgs
    }
    tasks.named('test') {
        jvmArgs += patchArgs
    }
    // end::patchArgs[]
    
    tasks.test.useJUnitPlatform()
    dependencies {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 606 bytes
    - Viewed (0)
  3. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/resolver/FindGradleSources.kt

            subDirsOf(distroDir.resolve("platforms"))
                .flatMap { platform -> subDirsOf(platform) }
    
        private
        fun unzippedDistroDir(): File? =
            input.get().asFile.listFiles().singleOrNull()
    }
    
    
    @DisableCachingByDefault(because = "Not worth caching")
    internal
    abstract class UnzipDistribution : TransformAction<TransformParameters.None> {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Dec 19 13:27:20 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. platforms/core-execution/execution-e2e-tests/src/integTest/groovy/org/gradle/integtests/TaskUpToDateIntegrationTest.groovy

                    @TaskAction
                    void doAction() {
                        layout.buildDirectory.file("output.txt").get().asFile.text = "Hello"
                        layout.buildDirectory.file("build.log").get().asFile << "Produced at \${new Date()}\\n"
                    }
                }
    
                task customTask(type: CustomTask) {
                    outputFiles = fileTree(file("build")) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Mar 04 10:15:40 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  5. platforms/documentation/docs/src/snippets/kotlinDsl/assignment/kotlin/build.gradle.kts

        @get:Input
        abstract val javaVersion: Property<String>
        @get:OutputFile
        abstract val output: RegularFileProperty
    
        @TaskAction
        fun execute() {
            output.get().asFile.writeText("Java version: ${javaVersion.get()}")
        }
    }
    
    tasks.register<WriteJavaVersionTask>("writeJavaVersion") {
        javaVersion.set("17") // <1>
        javaVersion = "17" // <2>
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 740 bytes
    - Viewed (0)
  6. platforms/ide/ide-plugins/src/test/groovy/org/gradle/plugins/ide/idea/model/IdeaProjectTest.groovy

            then:
            project.idea.project.outputFile == project.file("test-project.ipr")
            location.get().asFile == project.idea.project.outputFile
    
            when:
            project.idea.project.outputFile = project.file("other.ipr")
    
            then:
            location.get().asFile == project.idea.project.outputFile
        }
    
        def "project bytecode version set to highest module targetCompatibility"() {
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Aug 01 11:07:39 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  7. platforms/documentation/docs/src/snippets/dependencyManagement/artifactTransforms-minify/groovy/build.gradle

        void transform(TransformOutputs outputs) {
            def fileName = inputArtifact.get().asFile.name
            for (entry in parameters.keepClassesByArtifact) {      // <3>
                if (fileName.startsWith(entry.key)) {
                    def nameWithoutExtension = fileName.substring(0, fileName.length() - 4)
                    minify(inputArtifact.get().asFile, entry.value, outputs.file("${nameWithoutExtension}-min.jar"))
                    return
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  8. subprojects/core/src/test/groovy/org/gradle/api/internal/resources/ApiTextResourceAdapterTest.groovy

        }
    
        def "read as file when file in depending resource is null"() {
            expect:
            resource.asString() == "contents"
            resource.asFile().text == "contents"
            resource.asFile().text == "more contents"
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Feb 02 16:14:10 UTC 2021
    - 3.1K bytes
    - Viewed (0)
  9. subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/ArchivePublishArtifactTest.groovy

            then:
            a.archiveTask == quiteEmptyJar
            a.classifier == ""
            a.date.time == quiteEmptyJar.archiveFile.get().asFile.lastModified()
            a.extension == "jar"
            a.file == quiteEmptyJar.archiveFile.get().asFile
            a.type == "jar"
        }
    
        def "configures name correctly"() {
            def noName = testUtil.task(DummyJar)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Oct 28 15:32:09 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  10. testing/integ-test/src/integTest/groovy/org/gradle/integtests/DependencyResolutionFromTaskContextIntegrationTest.groovy

                    BadTask() {
                        println("creating bad task")
                    }
                    @TaskAction
                    void printIt() {
                        def outputFile = getOutputFile().get().asFile
                        outputFile.text = "bad"
                    }
                }
    
                abstract class GoodTask extends DefaultTask {
                    @OutputFile
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top