江澎涌
江澎涌

Reputation: 91

Could not get unknown property 'destinationDir'

When I upgrade the kotlin-gradle-plugin version from 1.5.0 to 1.7.20 in Android plugin project, I got this exception.

I use this code in build.gradle

compileGroovy.classpath += files(compileKotlin.destinationDir)

How can I solve it?

My evn is:

Upvotes: 2

Views: 3190

Answers (1)

江澎涌
江澎涌

Reputation: 91

I found the replacement function.

compileKotlin.destinationDirectory.get()

so the question can use this code to resolve.

compileGroovy.classpath += files(compileKotlin.destinationDirectory.get())

Upvotes: 7

Related Questions