Genymobile / Genymobile/scrcpy
Ninja build fails when server build folder is globally overriden
- Dominant language
- C
- Stars
- 150k
- Forks
- 13.7k
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 2
Description
There is possibility to set build directory for gradle projects globally so build artifacts may be stored in other place. (see project.buildDir from https://docs.gradle.org/current/userguide/writing_build_scripts.html). As result path to server apk file in server/scripts/build-wrapper.sh script is invalid.
Reproduction
1. Set global build dir for gradle (in init.gradle)
```
def configProject(p, buildDir) {
p.buildDir = "${buildDir}/${p.name}"
p.subprojects { s ->
configProject(s, "${p.buildDir}")
}
}
def buildDir = 'YOUR_BUILD_PATH'
if (!buildDir?.trim()) {
buildDir = "build"
}
gradle.projectsLoaded {
if (ext.has("group")) {
buildDir += "/${ext.group}"
}
configProject(rootProject, buildDir)
}
```
2. Run ninja build and observe
I know that this is not typical user case but still should be handled.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with server/scripts/build-wrapper.sh and reproduce the failure by setting a global Gradle build directory in init.gradle, then running the Ninja build. Trace where the server APK path is assembled. Done means the build succeeds when Gradle artifacts are stored outside the default build directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, shell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100