Skip to content

Commit 739aa21

Browse files
committed
Fix
1 parent 5179413 commit 739aa21

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

llm/android/LlamaDemo/app/build.gradle.kts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,11 @@ tasks.register("pushModelFiles") {
130130
val localPath = "$tempDir/$targetName"
131131
val devicePath = "$deviceModelDir/$targetName"
132132

133-
// Download file
133+
// Download file with progress indicator
134134
logger.lifecycle("Downloading from $sourceUrl...")
135-
val (dlCode, dlOutput) = execCmdWithExitCode(
136-
"curl", "-fL", "-o", localPath, sourceUrl
137-
)
135+
val dlCode = execCmdStreaming("curl", "-fL", "--progress-bar", "-o", localPath, sourceUrl)
138136
if (dlCode != 0) {
139-
throw GradleException("Failed to download from $sourceUrl: $dlOutput")
137+
throw GradleException("Failed to download from $sourceUrl")
140138
}
141139

142140
// Verify checksum if enabled and available (only for stories preset)
@@ -173,11 +171,11 @@ tasks.register("pushModelFiles") {
173171
}
174172
}
175173

176-
// Push to device
174+
// Push to device with progress
177175
logger.lifecycle("Pushing $targetName to device...")
178-
val (pushCode, pushOutput) = execCmdWithExitCode(adbPath, "push", localPath, devicePath)
176+
val pushCode = execCmdStreaming(adbPath, "push", localPath, devicePath)
179177
if (pushCode != 0) {
180-
throw GradleException("Failed to push $targetName to device: $pushOutput")
178+
throw GradleException("Failed to push $targetName to device")
181179
}
182180
logger.lifecycle("Successfully pushed $targetName")
183181
}

0 commit comments

Comments
 (0)