修改gradle配置进行源码打包
目录samples/sample-android/build.gradle
里面compileMatrixWithSrc = true
打包Matrix源码到MavenLocal
在matrix\matrix\matrix-android
目录下执行./gradlew publishToMavenLocal
,初次打包所有模块会比较久,以后修改源码以后,只需要执行对应module下的publishToMavenLocal方法即可
打包以后所在位置
mac和linux是在:${user.home}/.m2/repository
Windows是在:/Users/YourUserName/.m2/repository
参考链接:https://27house.cn/archives/2341
可能存在的问题
如果源码打包不通过,但是Sample工程可以,那么直接比较下dependencies-aar.gradle
与dependencies-src.gradle
里面的区别进行修改
如果提示apksigner找不到,那么需要修改samples/sample-android/app/build.gradle
按照如下修改
//Notice: You need to modify the value of $apksignerPath on different platform. the value below only suitable for Mac Platform,
//if on Windows, you may have to replace apksigner with apksigner.bat.
apksignerPath = "${android.getSdkDirectory().getAbsolutePath()}/build-tools/${android.getBuildToolsVersion()}/apksigner.bat"
zipAlignPath = "${android.getSdkDirectory().getAbsolutePath()}/build-tools/${android.getBuildToolsVersion()}/zipalign.exe"