File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
src/main/kotlin/com/github/gradle/node/util Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,11 @@ tasks.test {
9090 }
9191}
9292
93+ tasks.register(" runParameterTest" , JavaExec ::class .java) {
94+ classpath = sourceSets[" main" ].runtimeClasspath
95+ main = " com.github.gradle.node.util.PlatformHelperKt"
96+ }
97+
9398tasks.jacocoTestReport {
9499 reports {
95100 xml.isEnabled = true
Original file line number Diff line number Diff line change @@ -44,3 +44,13 @@ open class PlatformHelper constructor(private val props: Properties = System.get
4444 var INSTANCE = PlatformHelper ()
4545 }
4646}
47+
48+ fun main (args : Array <String >) {
49+ println (" Your os.name is: '${System .getProperty(" os.name" )} ' and is parsed as: ${PlatformHelper .INSTANCE .osName} " )
50+ println (" Your os.arch is: '${System .getProperty(" os.arch" )} ' and is parsed as: ${PlatformHelper .INSTANCE .osArch} " )
51+ if (PlatformHelper .INSTANCE .isWindows) {
52+ println (" You're on windows (isWindows == true)" )
53+ } else {
54+ println (" You're not on windows (isWindows == false)" )
55+ }
56+ }
You can’t perform that action at this time.
0 commit comments