Hi,
I have problem and I have finished with ideas where is problem.
I have shared libraries which build our android appliaction, everything works. But when project uses kotlin and aapt cruncher, cruncher works very slow. My build's timouts after one hour.
When I use the same project with Scripted Pipeline, Freestyle Job, or disable cruncher everything works ok, but not in shared libraries.
How can I find cause of this problem ?
I tried read logs, debug gradle, etc.
My example library looks like this:
def call(body) {
// evaluate the body block, and collect configuration into the object
def config = [:]
body.resolveStrategy = Closure.DELEGATE_FIRST
body.delegate = config
body()
timeout(60) {
node("${config.nodeLabel}") {
stage("Static analysis") {
deleteDir()
unstash "workspace"
wrap([$class: "AnsiColorBuildWrapper", "colorMapName": "VGA"]) {
withEnv(["GRADLE_USER_HOME=${env.WORKSPACE}/.gradle"]) {
sh "chmod +x gradlew"
sh "./gradlew --info --full-stacktrace --refresh-dependencies --continue -PversionCode=${env.BUILD_NUMBER} clean ${config.gradleTasks}"
}
}
}
}
}