简体   繁体   中英

How to publish a android library with java module?

My Project
- moduleA
- moduleAPT
- moduleJ

Above is my project structure. The moduleA is a shared library module, and moduleJ is a java module that contains some annotation classes, and moduleAPT is an annotation processing tool module that handles moduleJ's annotation classes. Both moduleA and moduleAPT have a dependence line in their build.gradle file like this:

api project(':moduleJ')

Now i want to publish the moduleA to jcenter. The problem is the generated aar file do not contains source files in moduleJ. How to merge moduleJ's classes to moduleA's aar file when compiling.

You can use this library to package aar fat-aar-android

I'm using it, it can merge multiple module

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM