Skip to content

Commit

Permalink
Switch tests to use locally installed Gradle instead of wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
calvertdw committed Sep 6, 2024
1 parent a2448df commit 08ee495
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 276 deletions.
14 changes: 12 additions & 2 deletions src/test/kotlin/us/ihmc/build/GradleTestingTools.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
package us.ihmc.build

import org.apache.commons.lang3.SystemUtils
import java.io.BufferedReader
import java.io.IOException
import java.io.InputStreamReader
import java.nio.file.Path
import java.nio.file.Paths
import java.util.concurrent.TimeUnit

val gradleCommand = if (SystemUtils.IS_OS_WINDOWS) "gradlew.bat" else "gradlew"
val gradleExe = Paths.get("tests/$gradleCommand").toAbsolutePath().toString()
val gradleExe = getLocalGradlePath()

private fun getLocalGradlePath(): String
{
val process = Runtime.getRuntime().exec(if (SystemUtils.IS_OS_WINDOWS) "where gradle" else "which gradle")
val reader = BufferedReader(InputStreamReader(process.inputStream))
val path = reader.readLine()
println("Gradle path: $path")
return path;
}

fun runGradleTask(command: String?, project: String): String
{
Expand Down
185 changes: 0 additions & 185 deletions tests/gradlew

This file was deleted.

89 changes: 0 additions & 89 deletions tests/gradlew.bat

This file was deleted.

0 comments on commit 08ee495

Please sign in to comment.