我在 GitHub 上有一个项目 OmegaIntentBuilder . 另外,我在 jitpack.io 上从这个项目创建了库
dependencies {
compile 'com.github.Omega-R:OmegaIntentBuilder:0.0.5'
}
图书馆工作,我可以毫无问题地导入它。 但现在我已经创建了两个带有代码生成的 java 子模块(“注释”、“处理器”)。
compile project(':annotations')
annotationProcessor project(':processor')
如何将这些子模块导入到 jitpack 中??我的意思是我想像这样使用它
compile 'com.github.Omega-R:OmegaIntentBuilder.annotations:0.0.5'
annotationProcessor 'com.github.Omega-R:OmegaIntentBuilder.processor:0.0.5'
我该怎么做?
最佳答案
这里是一个展示如何做的例子:https://github.com/jitpack/gradle-modular
要单独安装每个模块,请使用
groupId
:com.github.User.Repo
Artifact ID
:模块名称
注意只有 2 个冒号:在 group-id 之后和版本号之前!
compile 'com.github.jitpack.gradle-modular:client:1.1' compile 'com.github.jitpack.gradle-modular:server:1.1'
关于android - jitpack 的子模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48024138/