Menu Home

android studio

Android Studio: make jar

task clearJar(type: Delete) { delete ‘build/outputs/jar/something-release.jar’ } task makeJar(type: Copy) { from(‘build/intermediates/bundles/release/’) into(‘build/outputs/jar/’) include(‘classes.jar’) rename(‘classes.jar’, ‘something-release.jar’) } makeJar.dependsOn(clearJar, build)

Android Studio: Change AAR Build Name

android.libraryVariants.all { variant -> variant.outputs.each { output -> def outputFile = output.outputFile if (outputFile != null && outputFile.name.endsWith(‘.aar’)) { def fileName = “Your aar package name” output.outputFile = new File(outputFile.parent, fileName) } } } Rebuild your project, you will find the aar package file at build/outputs/aar