Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Externals/Gradle: Make git submodules track the remote branch #33

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions externals/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,18 @@ tasks {
//TODO Use a specific commit ID or TAG
register("initGitSubmodules", GitTask::class) { command = "submodule init" }

register("updateGitSubmodules", GitTask::class) {
command = "submodule update"

dependsOn("initGitSubmodules")
}

register("checkoutGitSubmodules", GitTask::class) {
command = "submodule foreach"
args = listOf("git checkout .") // The git command arguments
dependsOn("updateGitSubmodules")
dependsOn("initGitSubmodules")
}

register("updateGitSubmodules", GitTask::class) {
command = "submodule update --remote --recursive"
dependsOn("checkoutGitSubmodules")
}


register("cleanAll", Delete::class) {
delete(downloadablePath)
for (downloadble in downloadables) {
Expand All @@ -164,5 +164,5 @@ tasks {

tasks.named("build") {
dependsOn("copyFromTar")
dependsOn("checkoutGitSubmodules")
dependsOn("updateGitSubmodules")
}