Shared libraries and very slow aapt cruncher (android)

16 views
Skip to first unread message

Maciej Gąsiorowski

unread,
Jul 25, 2017, 7:43:26 AM7/25/17
to Jenkins Users
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}"
}
}
}
}
}

Maciej Gąsiorowski

unread,
Jul 26, 2017, 4:09:05 AM7/26/17
to Jenkins Users
I think I found a cause, when I remove ansi color wrapper everything works :)
Reply all
Reply to author
Forward
0 new messages