Android Gradle Specify Module Packaging
There are many Module in the project that can run directly independently, how to configure the signature file in Gradle, then it doesn't need the normal manual click Generate Signed APK , the use is Terminal more convenient.
Specify Module Packaging commands
Input:
./gradlew :<ModuleName>:assembleRelease
Example:
./gradlew :sampleApp:assembleRelease
[Error]command not found
Usually because Gradle is not added to PATH the
For example, the above command can be:
gradle :sampleApp:assembleRelease
This error will occur
will be gradle replaced ./gradlew . ( ./ Represents a sibling directory)
To configure the signature file in Gradle
Example:
signingConfigs { release { storeFile file("android.jks") storePassword "android123" keyAlias "androidAlias" keyPassword "android123" } }
The android.jks file is placed in the root directory of the corresponding module.
Note: The disadvantage is that the signature files and passwords are uploaded to the warehouse, how the warehouse open source so directly on the public, you can put the password in the project * * * * * * * * * gradle.properties, the specific can Google, the Chinese material a lot of. enjoy~
Android Gradle Specify Module Packaging