Skip to content

Commit

Permalink
i'm dumbass (-_-(
Browse files Browse the repository at this point in the history
  • Loading branch information
nekit508 authored Jan 12, 2024
1 parent 5f041f5 commit c55754b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ task dex {
dependencies += "--classpath $path.path "
}

String executableName = System.getenv("OS") == "Windows_NT" ? "d8.bat" : "d8"

def buildToolsRoot = new File("$sdkRoot/build-tools/").listFiles().sort().reverse().find {
f -> new File(f, "d8.bat").exists()
f -> new File(f, ).exists(executableName)
}
if (!buildToolsRoot)
throw new GradleException("No d8.bat found. Ensure that you have an Android build tools installed.")
"${buildToolsRoot}/d8${System.getenv("OS") == "Windows_NT" ? ".bat" : ""} $dependencies ${project.tasks.jar.archiveFile.get()} --min-api 14 --output $dexFile.absolutePath"
throw new GradleException("No $executableName found. Ensure that you have an Android build tools installed.")
"$buildToolsRoot/$executableName $dependencies ${project.tasks.jar.archiveFile.get()} --min-api 14 --output $dexFile.absolutePath"
.execute(null, projectDir).waitForProcessOutput(System.out, System.err)
}

Expand Down

0 comments on commit c55754b

Please sign in to comment.