I recently upgraded my Android Studio to version 2.3 with the corresponding gradle version.
I have two modules inside my projec
Not sure if this is the proper solution but I added this to my gradle file within the android section and the release folder has returned.
publishNonDefault true
On Android studio 3.1+ the build path got changed. So change the path to "build/intermediates/packaged-classes/release/".
task exportJar(type: Copy)
{
from('build/intermediates/packaged-classes/release/')
into('build/outputs/')
include('classes.jar')
rename ('classes.jar', 'NAME.jar')
}