JvmLocalLibraryMetaDataAdapter.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:Reer 作者:
private void createJvmAssemblyLocalComponentMetaData(EnumMap<UsageKind, List<PublishArtifact>> artifacts, JvmAssembly assembly, EnumMap<UsageKind, Iterable<DependencySpec>> dependenciesPerUsage, boolean toAssembly) {
    configureUsageMetadata(UsageKind.API,
        Collections.<DependencySpec>emptyList(),
        dependenciesPerUsage);
    configureUsageMetadata(UsageKind.RUNTIME,
        Collections.<DependencySpec>emptyList(),
        dependenciesPerUsage);
    if (toAssembly) {
        // TODO:Cedric This is an approximation: when a component wants to compile against the assembly of
        // a library (not the jar), then we should give it the *stubbed classes* instead of the raw classes. However:
        // - there's no such thing as a "stubbed classes assembly"
        // - for performance reasons only the classes that belong to the API are stubbed, so we would miss the classes that do not belong to the API
        // So this makes the UsageKind.API misleading (should this be COMPILE?).
        addArtifact(UsageKind.API, assembly.getClassDirectories(), artifacts, assembly);
        addArtifact(UsageKind.RUNTIME, Sets.union(assembly.getClassDirectories(), assembly.getResourceDirectories()), artifacts, assembly);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号