List<JavaPlatform> selectedPlatforms = resolvePlatforms(platforms, jvmLibrary);
final Set<String> exportedPackages = exportedPackagesOf(jvmLibrary);
final Collection<DependencySpec> apiDependencies = apiDependenciesOf(jvmLibrary);
final Collection<DependencySpec> dependencies = componentDependenciesOf(jvmLibrary);
for (final JavaPlatform platform : selectedPlatforms) {
<BUG>String binaryName = buildBinaryName(jvmLibrary, namingSchemeBuilder, selectedPlatforms, platform);
binaries.create(binaryName, new Action<JarBinarySpec>() {</BUG>
@Override
public void execute(JarBinarySpec jarBinarySpec) {
JarBinarySpecInternal jarBinary = (JarBinarySpecInternal) jarBinarySpec;

List<JavaPlatform> selectedPlatforms = resolvePlatforms(platforms, jvmLibrary);
final Set<String> exportedPackages = exportedPackagesOf(jvmLibrary);
final Collection<DependencySpec> apiDependencies = apiDependenciesOf(jvmLibrary);
final Collection<DependencySpec> dependencies = componentDependenciesOf(jvmLibrary);
for (final JavaPlatform platform : selectedPlatforms) {
String binaryName = buildBinaryName(jvmLibrary, selectedPlatforms, platform);
binaries.create(binaryName, new Action<JarBinarySpec>() {
@Override
public void execute(JarBinarySpec jarBinarySpec) {
JarBinarySpecInternal jarBinary = (JarBinarySpecInternal) jarBinarySpec;
