File tree Expand file tree Collapse file tree 13 files changed +14
-47
lines changed
main/kotlin/com/github/gradle/node Expand file tree Collapse file tree 13 files changed +14
-47
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,7 @@ class NodePlugin : Plugin<Project> {
122
122
content {
123
123
includeModule(" org.nodejs" , " node" )
124
124
}
125
- if (GradleVersion .current() >= GradleVersion .version(" 6.0" )) {
126
- allowInsecureProtocol?.let { isAllowInsecureProtocol = it }
127
- }
125
+ allowInsecureProtocol?.let { isAllowInsecureProtocol = it }
128
126
}
129
127
}
130
128
Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ open class PackageJsonExtension(project: Project) {
17
17
val node = project.objects.property<JsonNode >()
18
18
19
19
init {
20
- if (GradleVersion .current() >= GradleVersion .version(" 6.1" )) {
21
- node.finalizeValueOnRead()
22
- }
20
+ node.finalizeValueOnRead()
23
21
node.set(project.provider { project.file(" package.json" ).let (ObjectMapper ()::readTree) })
24
22
}
25
23
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import org.gradle.util.GradleVersion
14
14
import java.io.File
15
15
import javax.inject.Inject
16
16
17
+ @Deprecated(message = " Only 6.6 and newer is supported" )
17
18
interface ProjectApiHelper {
18
19
companion object {
19
20
@JvmStatic
@@ -26,7 +27,7 @@ interface ProjectApiHelper {
26
27
}
27
28
28
29
private fun enableConfigurationCache (): Boolean {
29
- return GradleVersion .current() >= GradleVersion .version( " 6.6 " )
30
+ return true
30
31
}
31
32
}
32
33
Original file line number Diff line number Diff line change @@ -58,8 +58,5 @@ task version(type: NodeTask) {
58
58
}
59
59
60
60
def isPropertyEnabled (String name ) {
61
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
62
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
63
- }
64
- return System . properties[name] != null
61
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
65
62
}
Original file line number Diff line number Diff line change @@ -43,8 +43,5 @@ task version(type: NodeTask) {
43
43
}
44
44
45
45
def isPropertyEnabled (String name ) {
46
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
47
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
48
- }
49
- return System . properties[name] != null
46
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
50
47
}
Original file line number Diff line number Diff line change @@ -60,8 +60,5 @@ if (isPropertyEnabled("outputFile")) {
60
60
}
61
61
62
62
def isPropertyEnabled (String name ) {
63
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
64
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
65
- }
66
- return System . properties[name] != null
63
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
67
64
}
Original file line number Diff line number Diff line change @@ -30,8 +30,5 @@ task version(type: NpmTask) {
30
30
}
31
31
32
32
def isPropertyEnabled (String name ) {
33
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
34
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
35
- }
36
- return System . properties[name] != null
33
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
37
34
}
Original file line number Diff line number Diff line change @@ -69,8 +69,5 @@ if (isPropertyEnabled("outputFile")) {
69
69
}
70
70
71
71
def isPropertyEnabled (String name ) {
72
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
73
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
74
- }
75
- return System . properties[name] != null
72
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
76
73
}
Original file line number Diff line number Diff line change @@ -60,8 +60,5 @@ if (isPropertyEnabled("changeInputs")) {
60
60
}
61
61
62
62
def isPropertyEnabled (String name ) {
63
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
64
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
65
- }
66
- return System . properties[name] != null
63
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
67
64
}
Original file line number Diff line number Diff line change @@ -59,8 +59,5 @@ if (isPropertyEnabled("outputFile")) {
59
59
}
60
60
61
61
def isPropertyEnabled (String name ) {
62
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
63
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
64
- }
65
- return System . properties[name] != null
62
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
66
63
}
Original file line number Diff line number Diff line change @@ -30,8 +30,5 @@ task version(type: PnpmTask) {
30
30
}
31
31
32
32
def isPropertyEnabled (String name ) {
33
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
34
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
35
- }
36
- return System . properties[name] != null
33
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
37
34
}
Original file line number Diff line number Diff line change @@ -60,8 +60,5 @@ if (isPropertyEnabled("outputFile")) {
60
60
}
61
61
62
62
def isPropertyEnabled (String name ) {
63
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
64
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
65
- }
66
- return System . properties[name] != null
63
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
67
64
}
Original file line number Diff line number Diff line change @@ -31,8 +31,5 @@ task version(type: YarnTask) {
31
31
}
32
32
33
33
def isPropertyEnabled (String name ) {
34
- if (GradleVersion . current() >= GradleVersion . version(" 6.6" )) {
35
- return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
36
- }
37
- return System . properties[name] != null
34
+ return providers. systemProperty(name). forUseAtConfigurationTime(). isPresent()
38
35
}
You can’t perform that action at this time.
0 commit comments