diff --git a/ddprof-lib/build.gradle b/ddprof-lib/build.gradle index 8c40747a..74dfd7c9 100644 --- a/ddprof-lib/build.gradle +++ b/ddprof-lib/build.gradle @@ -291,7 +291,10 @@ def cloneAPTask = tasks.register('cloneAsyncProfiler') { println "async-profiler commit hash differs (current: ${currentCommit}, expected: ${commit_lock}), updating..." exec { workingDir targetDir.absolutePath - commandLine 'git', 'fetch', 'origin', branch_lock, '--depth', '1' + commandLine 'rm', '-rf', targetDir.absolutePath + } + exec { + commandLine 'git', 'clone', '--branch', branch_lock, 'https://github.com/datadog/async-profiler.git', targetDir.absolutePath } exec { workingDir targetDir.absolutePath