How to publish Android .aar sources to make Android Studio automatically find them?

后端 未结 2 854
执笔经年
执笔经年 2021-01-31 22:04

I\'m publishing libraries to an internal Sonatype Nexus repository.

Android Studio has a feature that automatically finds the correct source for a library that is refere

相关标签:
2条回答
  • 2021-01-31 22:21

    I have wrote a gradle plugin for this function. Hope it will help you.

    ----- edit ------

    How to publish Android .aar sources?

    android {
    
        task sourcesJar(type: Jar) {
            classifier = 'sources'
            from android.sourceSets.main.java.srcDirs
        }
    
        artifacts {
            archives sourcesJar
        }
    
        uploadArchives {
            repositories {
                mavenDeployer {
                    ...
                }
            }
        }
    }
    
    0 讨论(0)
  • 2021-01-31 22:26

    It's not possible at the moment.

    0 讨论(0)
提交回复
热议问题