diff --git a/buildSrc/src/main/groovy/echosvg.java-conventions.gradle b/buildSrc/src/main/groovy/echosvg.java-conventions.gradle index 7277a6c28..d62ee0701 100644 --- a/buildSrc/src/main/groovy/echosvg.java-conventions.gradle +++ b/buildSrc/src/main/groovy/echosvg.java-conventions.gradle @@ -32,17 +32,15 @@ java { tasks.register('jvmVersionAttribute') { description = "Set the correct 'org.gradle.jvm.version' attribute" - if (!project.getPluginManager().hasPlugin('eclipse')) { - def jvmVersionAttribute = Attribute.of('org.gradle.jvm.version', Integer) - configurations.each { - if (it.canBeConsumed) { - def categoryAttr = it.attributes.getAttribute(Category.CATEGORY_ATTRIBUTE) - if (categoryAttr != null && categoryAttr.name == Category.LIBRARY) { - def usageAttr = it.attributes.getAttribute(Usage.USAGE_ATTRIBUTE) - if (usageAttr != null && (usageAttr.name == Usage.JAVA_API - || usageAttr.name == Usage.JAVA_RUNTIME)) { - it.attributes.attribute(jvmVersionAttribute, 8) - } + def jvmVersionAttribute = Attribute.of('org.gradle.jvm.version', Integer) + configurations.each { + if (it.canBeConsumed) { + def categoryAttr = it.attributes.getAttribute(Category.CATEGORY_ATTRIBUTE) + if (categoryAttr != null && categoryAttr.name == Category.LIBRARY) { + def usageAttr = it.attributes.getAttribute(Usage.USAGE_ATTRIBUTE) + if (usageAttr != null && (usageAttr.name == Usage.JAVA_API + || usageAttr.name == Usage.JAVA_RUNTIME)) { + it.attributes.attribute(jvmVersionAttribute, 8) } } }