I have built my android library package (aar) and the result of build is created in \"..\\app\\build\\outputs\\aar\" folder. The file within this folder is called \"app-deb
Yet another 2 part question where nobody answers the second part...
For the future generations, here are simple answers:
Part 1 How to create release only *release.aar
?
Run in android studio terminal
(or any terminal in your project folder).:
./gradlew assembleRelease
You don`t need signing config for such task.
Part 2 How to rename the output library to AnotherLibraryName-release.aar
?
Add to your module gradle.build
:
android{
project.archivesBaseName = "AnotherLibraryName"
}
1.add following script to your android{} tag in build.gradle to generate a release build:
signingConfigs {
testConfig{
storeFile file("X:/XXXX/yourkeystore")
storePassword "yourKeyPassword"
keyAlias "yourAlias"
keyPassword "yourAliasPassword"
}
}
buildTypes{
release {
signingConfig signingConfigs.testConfig
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
2.run command "gradle clean build" in you command line.
This issue of can already be handled with the answers like execute
./gradlew assembleRelease
or choose assembleRelease from Android Studio's Gradle menu. However, for completeness, with Android Studio 1.5.1 (and probably also older versions) building release version of a .aar can be accomplished by selecting Build->"Build APK" in Android Studio. It seems to execute assembleRelease. If your project only contains the library project, it does not ask for any signing information.