Gradle version upgrade
Created by: buzuck
When upgrading the project to the latest version of Gradle (3.0.0 -- or is it 4.1 ?), the following error occurs :
> Could not resolve all dependencies for configuration ':compile'.
> A problem occurred configuring project ':org.whispersystems.libsignal'.
> Cannot set the value of read-only property 'outputFile' for object of type com.android.build.gradle.internal.api.LibraryVariantOutputImpl.
The incriminated code :
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def fileName = "${archivesBaseName}-${version}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
I stumbled upon this on Stackoverflow, but as I'm new on Android development, I couldn't figure out what is wrong https://stackoverflow.com/questions/24728591/how-to-set-name-of-aar-output-from-gradle