Skip to content

Commit

Permalink
build: pass canonical path to git --git-dir to avoid failure on Win…
Browse files Browse the repository at this point in the history
…dows
  • Loading branch information
WhiredPlanck committed Dec 13, 2024
1 parent bfb1b56 commit cfa1c24
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import java.io.File

class NativeAppConventionPlugin : NativeBaseConventionPlugin() {
private val Project.librimeDotGit: File
get() = file("src/main/jni/librime/.git")
get() = file("src/main/jni/librime/.git").normalize()

private val Project.openccDotGit: File
get() = file("src/main/jni/OpenCC/.git")
get() = file("src/main/jni/OpenCC/.git").normalize()

private val Project.librimeVersion: String
get() = runCmd("git --git-dir ${librimeDotGit.absolutePath} describe --tags --long --always --exclude 'latest'")
get() = runCmd("git --git-dir ${librimeDotGit.path} describe --tags --long --always --exclude 'latest'")

private val Project.openccVersion: String
get() =
runCmd("git --git-dir ${openccDotGit.absolutePath} describe --tags --long --always")
runCmd("git --git-dir ${openccDotGit.path} describe --tags --long --always")

override fun apply(target: Project) {
super.apply(target)
Expand Down

0 comments on commit cfa1c24

Please sign in to comment.