I am new to android development.
I am creating an android library (.aar) and the library variant in gradle is as follows :
variant.outputs.all {
output -> def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar'))
{
def fileName = "${archivesBaseName}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
And the error is :
Cannot set the value of read-only property 'outputFile' for object of type com.android.build.gradle.internal.api.LibraryVariantOutputImpl.
Previously, it was working fine. But now I have updated the android studio to 3.0 & the gradle plugin causing this error.