How to configure the processResources task in a Gradle Kotlin build
问题 I have the following in a groovy-based build script. How do I do the same in a kotlin-based script? processResources { filesMatching('application.properties'){ expand(project.properties) } } 回答1: I think task should look like: Edit : According this comment in gradle/kotlin-dsl repository. Task configuration should work this way: import org.gradle.language.jvm.tasks.ProcessResources apply { plugin("java") } (tasks.getByName("processResources") as ProcessResources).apply { filesMatching(