JBokMan95
JBokMan95

Reputation: 249

How to solve 'setter for fileMode: Int?' is deprecated. Deprecated in Java in build.gradle

I register a new gradle task in my build.gradle.kts to install git hooks every time I build.

tasks {
    register("installLocalPostCommitGitHook", Copy::class) {
        from(File(rootProject.rootDir, "scripts/post-commit"))
        into { File(rootProject.rootDir, ".git/hooks") }
        fileMode = 0b111101101
    }
}

When I run "Sync Project with Gradle Files" I get the warning

'setter for fileMode: Int?' is deprecated. Deprecated in Java

I need to set the file mode to make the file executable. How can I fix this?

Upvotes: 0

Views: 402

Answers (1)

Related Questions