在主项目中显示注释

Show annotations in main project

我有一个库,其中包含我为其编写注释的方法。这是一种方法:

/**
     * Delete Connection.
     * Result is returned through callback.
     *
     * @param customerSecret - current Customer secret code
     * @param connectionSecret - secret code of the Connection which should be deleted if exist
     * @param callback - callback for request result
     */
    public void deleteConnection(String customerSecret,
                                 String connectionSecret,
                                 DeleteEntryResult callback) {
        new ConnectionDeleteConnector(callback).deleteConnection(customerSecret, connectionSecret);
    }

但是当我在我的主项目中使用这个方法时,我没有看到这个注解:

public void deleteConnection(String customerSecret, String connectionSecret, DeleteEntryResult callback) {
    (new ConnectionDeleteConnector(callback)).deleteConnection(customerSecret, connectionSecret);
}

问:如何在项目中显示我的注释?

解决了我的问题 post

食谱很简单:

注释要查看注释的方法

build.gradle 中写入任务以选择要记录的 类:

task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'

    include("**/SomeClass.java")
}
artifacts {
    archives sourcesJar
}

之后,重建你的图书馆,一切都应该正常。