Skip to content

Commit 5f49c55

Browse files
committed
Only attempt to set allowInsecureProtocol in Gradle >= 6.0.
1 parent 5a34045 commit 5f49c55

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/kotlin/com/github/gradle/node/NodePlugin.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import org.gradle.api.Project
1616
import org.gradle.kotlin.dsl.create
1717
import org.gradle.kotlin.dsl.named
1818
import org.gradle.kotlin.dsl.register
19+
import org.gradle.util.GradleVersion
1920
import java.io.File
2021

2122
class NodePlugin : Plugin<Project> {
@@ -99,7 +100,9 @@ class NodePlugin : Plugin<Project> {
99100
content {
100101
includeModule("org.nodejs", "node")
101102
}
102-
allowInsecureProtocol?.let { isAllowInsecureProtocol = it }
103+
if (GradleVersion.current() >= GradleVersion.version("6.0")) {
104+
allowInsecureProtocol?.let { isAllowInsecureProtocol = it }
105+
}
103106
}
104107
}
105108

0 commit comments

Comments
 (0)