val sharedConfiguration: Configuration by configurations.creating {
    isCanBeConsumed = false
    isCanBeResolved = true
}

dependencies {
    sharedConfiguration(project(path = ":producer", configuration = "sharedConfiguration"))
}

val sharedFile: File = sharedConfiguration.singleFile

tasks.register("showFile") {
    inputs.file(sharedFile)

    val sharedFileAbsolutePath = sharedFile.absolutePath
    doFirst {
        logger.lifecycle(sharedFileAbsolutePath)
    }
}

val sharedConfiguration: Configuration by configurations.creating {
    isCanBeConsumed = false
    isCanBeResolved = true
}

dependencies {
    sharedConfiguration(project(path = ":producer", configuration = "sharedConfiguration"))
}

tasks.register("showFile") {
    inputs.files(sharedConfiguration)

    doFirst {
        logger.lifecycle("File is at {}", sharedConfiguration.singleFile.absolutePath)
    }
}

Align samples better by simplifying Kotlin code
Align samples better by simplifying Kotlin code

gradle/gradle,gradle/gradle,gradle/gradle,gradle/gradle,gradle/gradle,gradle/gradle,gradle/gradle,gradle/gradle,gradle/gradle,gradle/gradle