[Android Pro] AAR and JAR
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Android Pro] AAR and JAR相关的知识,希望对你有一定的参考价值。
svn status
svn log --limit 3 > RELEASE_NOTE.txt
cat RELEASE_NOTE.txt
pwd
project_name_prefix="${APP_PROJECT_NAME}_${VERSIONNAME}_${VERSIONCODE}"
#build_pre
cat app/src/main/java/com/baidu/security/scansdk/config/FeatureConfig.java
sed -i ‘s/android:versionCode=".*"/android:versionCode="‘${VERSIONCODE}‘"/‘ app/src/main/AndroidManifest.xml
sed -i ‘s/android:versionName=".*"/android:versionName="‘${VERSIONNAME}‘"/‘ app/src/main/AndroidManifest.xml
cat app/src/main/AndroidManifest.xml
sed -i ‘s/SDK_VERSION = ".*"/SDK_VERSION = "‘${VERSIONNAME}‘"/‘ app/src/main/java/com/baidu/security/scansdk/config/FeatureConfig.java
cat app/src/main/java/com/baidu/security/scansdk/config/FeatureConfig.java
./gradlew clean aR
cd app/build/intermediates/bundles/release/
jar xvf classes.jar
jar cvf ${project_name_prefix}.jar com assets
cd ../../../outputs/aar/
mkdir AAR_VERSION
mkdir JAR_VERSION
mv app-release.aar AAR_VERSION/${project_name_prefix}.aar
mv ../../intermediates/bundles/release/${project_name_prefix}.jar JAR_VERSION/${project_name_prefix}.jar
mv ../../intermediates/bundles/release/jni/armeabi JAR_VERSION/armeabi
tar czvf ${project_name_prefix}.tar.gz AAR_VERSION JAR_VERSION ../../../../RELEASE_NOTE.txt
#mv ${project_name_prefix}.apk ${WORKSPACE}/output/
mv ${project_name_prefix}.tar.gz /home/jenkins/publish/sdk
svn copy https://xxxx/branches/client/${APP_BRANCH} https://xxxxx/tags/client/${project_name_prefix}_PD_BL/ -m "make tag for ${project_name_prefix}"
#build_post
# pubilsh by http
# mv ${WORKSPACE}/output/* /home/jenkins/publish/sdk
以上是关于[Android Pro] AAR and JAR的主要内容,如果未能解决你的问题,请参考以下文章
如何为本地.aar库设置transitive = true? [重复]
Android 库:使用 proguard 时释放 .aar 使 classes.jar 为空
[Android Pro] Dangerous permissions and permission groups.
带有 proguard 的 Kotlin AAR 库:如何只保留类和方法名?