use of com.google.devtools.build.lib.rules.java.JavaProvider in project bazel by bazelbuild.
the class SkylarkJavaLiteProtoLibraryTest method getProvider.
private static <P extends TransitiveInfoProvider> P getProvider(Class<P> providerClass, ConfiguredTarget target) {
SkylarkProviders skylarkProviders = target.getProvider(SkylarkProviders.class);
JavaProvider javaProvider = (JavaProvider) skylarkProviders.getDeclaredProvider(JavaProvider.JAVA_PROVIDER.getKey());
return javaProvider.getProvider(providerClass);
}
Aggregations