Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 579 for asFile (0.12 sec)

  1. platforms/core-configuration/file-collections/src/test/groovy/org/gradle/api/internal/file/DefaultFilePropertyFactoryTest.groovy

            expect:
            def dir = factory.dir(location)
            dir.asFile == location
        }
    
        def "can create directory instance from relative file"() {
            def location = projectDir.createDir("dir")
    
            expect:
            def dir = factory.dir(new File("dir"))
            dir.asFile == location
        }
    
        def "can create file instance from absolute file"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  2. build-logic/cleanup/src/main/kotlin/gradlebuild/cleanup/Cleanup.kt

     */
    fun FileSystemOperations.removeOldVersionsFromDir(dir: Directory, shouldDelete: Spec<GradleVersion>, dirPrefix: String = "", dirSuffix: String = "") {
        if (dir.asFile.isDirectory) {
            for (cacheDir in dir.asFile.listFiles()) {
                val cacheDirName = cacheDir.name
                if (!cacheDirName.startsWith(dirPrefix) || !cacheDirName.endsWith(dirSuffix)) {
                    continue
                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Jan 08 12:45:57 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  3. platforms/core-configuration/file-collections/src/test/groovy/org/gradle/api/internal/file/FileSystemPropertySpec.groovy

            def prop = propertyWithNoValue()
            prop.set(file)
    
            expect:
            prop.get().asFile == file
        }
    
        def "can set value using relative file"() {
            given:
            def file = new File("thing")
            def prop = propertyWithNoValue()
            prop.set(file)
    
            expect:
            prop.get().asFile == tmpDir.file("thing")
        }
    
        def "can set value using absolute file provider"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  4. platforms/documentation/docs/src/snippets/dependencyManagement/definingUsingConfigurations-custom/groovy/build.gradle

                        classpath: jasperClasspath)
            ant.jasper(validateXml: false,
                       uriroot: projectLayout.projectDirectory.file('src/main/webapp').asFile,
                       outputDir: projectLayout.buildDirectory.file("compiled-jsps").get().asFile)
        }
    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 719 bytes
    - Viewed (0)
  5. platforms/documentation/docs/src/snippets/java/customDirs/kotlin/build.gradle.kts

        val testResultsDir = project.java.testResultsDir
    
        doLast {
            logger.quiet(rootDir.toPath().relativize(reportsDir.get().asFile.toPath()).toString())
            logger.quiet(rootDir.toPath().relativize(testResultsDir.get().asFile.toPath()).toString())
        }
    }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  6. platforms/jvm/scala/src/test/groovy/org/gradle/api/plugins/scala/ScalaPluginTest.groovy

            testTask.classpath.files as List == [
                mainSourceSet.java.destinationDirectory.get().asFile,
                mainSourceSet.scala.destinationDirectory.get().asFile,
                mainSourceSet.output.resourcesDir,
                testSourceSet.java.destinationDirectory.get().asFile,
            ]
            testTask.source as List == testSourceSet.scala as List
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 15:43:33 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  7. platforms/documentation/docs/src/snippets/tasks/customTaskWithFileProperty/kotlin/build.gradle.kts

    // tag::task[]
    abstract class GreetingToFileTask : DefaultTask() {
    
        @get:OutputFile
        abstract val destination: RegularFileProperty
    
        @TaskAction
        fun greet() {
            val file = destination.get().asFile
            file.parentFile.mkdirs()
            file.writeText("Hello!")
        }
    }
    // end::task[]
    
    // tag::config[]
    val greetingFile = objects.fileProperty()
    
    tasks.register<GreetingToFileTask>("greet") {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 764 bytes
    - Viewed (0)
  8. platforms/jvm/code-quality/src/main/groovy/org/gradle/api/plugins/quality/internal/CheckstyleInvoker.groovy

            def sarifOutputLocation = parameters.sarifOutputLocation.asFile.getOrElse(null)
            VersionNumber currentToolVersion = determineCheckstyleVersion(Thread.currentThread().getContextClassLoader())
            def sarifSupported = isSarifSupported(currentToolVersion)
    
            if (isHtmlReportEnabledOnly(isXmlRequired, isHtmlRequired)) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 16 22:34:07 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  9. platforms/core-configuration/file-collections/src/integTest/groovy/org/gradle/api/file/FileCollectionIntegrationTest.groovy

                    def root = layout.projectDirectory.asFile
                    fc.filter { File f ->
                        f.isDirectory()
                    }.elements.map {
                        it.collect { fileSystemLocation ->
                            projectDir.dir(fileSystemLocation.asFile.absolutePath)
                        }
                    }
                }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 12:54:09 UTC 2024
    - 21K bytes
    - Viewed (0)
  10. platforms/documentation/docs/src/snippets/dependencyManagement/artifactTransforms-relocate/groovy/build.gradle

        abstract FileCollection getDependencies()
    
        @Override
        void transform(TransformOutputs outputs) {
            def primaryInputFile = primaryInput.get().asFile
            if (parameters.externalClasspath.contains(primaryInput)) {           // <6>
                outputs.file(primaryInput)
            } else {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top