"Injecting the input artifact of a transform as a File has been deprecated."

Viewed 529

I'm getting the warning "Injecting the input artifact of a transform as a File has been deprecated. This is scheduled to be removed in Gradle 6.0. Declare the input artifact as a Provider<FileSystemLocation> instead." when Syncing my Gradle.

What in the world does that mean?

I see in the stack trace for the warning something about com.android.build.gradle.internal.dependency.ExtractAarTransform. I do have two dependencies using @aar in my build.gradle:

implementation('com.amazonaws:aws-android-sdk-mobile-client:2.16.8@aar') { transitive = true }

and

implementation 'com.amazonaws:aws-android-sdk-cognitoauth:2.16.8@aar'

Could it be one of these that the warning is referring to? What am I supposed to do with these if not whatever I am doing with them already?

1 Answers

Based On https://kotlinlang.org/docs/reference/kapt.html

Starting from version 1.3.30, kapt supports incremental annotation processing as an experimental feature. Currently, annotation processing can be incremental only if all annotation processors being used are incremental.

Incremental annotation processing is enabled by default starting from version 1.3.50. To disable incremental annotation processing, add this line to your gradle.properties file:

kapt.incremental.apt=false

Incremental compilation The Kotlin Gradle plugin supports incremental compilation. Incremental compilation tracks changes of source files between builds so only files affected by these changes would be compiled.

Related