android - jitpack 的子模块

标签 android android-studio jitpack

我在 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/

相关文章:

android deeplink,强制从外部打开

java - 与主键、数据类型映射相关的Azure离线sqlite存储同步问题

java - 运行后应用程序在模拟器中关闭

android - 使用 JitPack 在 Gradle 中加载库

android - Koin 无法从已发布的库中创建类的实例

java - "Android Gradle plugin requires Java 11 to run"发布jitpack库时

android - Google Analytics(分析)人口统计功能是否适用于移动设备?

android - 使用参数启动 android 应用程序 - 快捷方式

android - 错误 :Gradle: Execution failed for task ':androidLib:compileDebugJavaWithJavac' . > 编译失败;有关详细信息,请参阅编译器错误输出

java - 如何从 Android Studio logcat 中排除某些错误?