Workaround for errors caused by building modules in parallel

See https://issuetracker.google.com/issues/265544858#comment22
This commit is contained in:
Robert Pösel 2024-01-30 22:10:43 +01:00
parent 21305b9bd6
commit c158f19585
3 changed files with 40 additions and 0 deletions

View File

@ -89,3 +89,14 @@ afterEvaluate {
}
}
}
// Workaround for errors caused by building modules in parallel
// See https://issuetracker.google.com/issues/265544858#comment22
afterEvaluate {
android.libraryVariants.configureEach { variant ->
// Add this to any package that publishes a prefab
tasks.named("prefab${variant.name.capitalize()}ConfigurePackage").configure {
outputs.upToDateWhen { false }
}
}
}

View File

@ -92,3 +92,20 @@ afterEvaluate {
}
}
}
// Workaround for errors caused by building modules in parallel
// See https://issuetracker.google.com/issues/265544858#comment22
afterEvaluate {
android.libraryVariants.configureEach { variant ->
variant.preBuildProvider.configure {
// Add all the project dependencies here
dependsOn.add(":leptonica:prefab${variant.name.capitalize()}ConfigurePackage")
}
// Add this to any package that publishes a prefab
tasks.named("prefab${variant.name.capitalize()}ConfigurePackage").configure {
outputs.upToDateWhen { false }
}
}
}

View File

@ -135,3 +135,15 @@ afterEvaluate {
}
}
}
// Workaround for errors caused by building modules in parallel
// See https://issuetracker.google.com/issues/265544858#comment22
afterEvaluate {
android.libraryVariants.configureEach { variant ->
variant.preBuildProvider.configure {
// Add all the project dependencies here
dependsOn.add(":leptonica:prefab${variant.name.capitalize()}ConfigurePackage")
dependsOn.add(":tesseract:prefab${variant.name.capitalize()}ConfigurePackage")
}
}
}