Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for parentOrRoot (0.09 seconds)

  1. build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/BuildEnvironment.kt

    fun Directory.parentOrRoot(): Directory = if (this.file("version.txt").asFile.exists()) {
        this
    } else {
        val parent = dir("..")
        when {
            parent.file("version.txt").asFile.exists() -> parent
            this == parent -> error("Cannot find 'version.txt' file in root of repository")
            else -> parent.parentOrRoot()
        }
    }
    
    
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Wed Mar 25 08:51:12 GMT 2026
    - 4.9K bytes
    - Click Count (1)
Back to Top