Pipeline crashes with token recognition at ...

Eren Alpaslan April 25, 2023

I have a pipeline to build and distribute an android application. Previously i was getting success with the same bitbucket.yaml configuration but then it returns error to me. When it comes to the '''kaptReleaseKotlin''' task it is giving this error

> Task :app:kaptReleaseKotlin

line 1:30 token recognition error at: ''??'
line 1:34 token recognition error at: '''
line 1:94 token recognition error at: ''??'
line 1:98 token recognition error at: '''
line 1:57 token recognition error at: ''??'
line 1:61 token recognition error at: '''
line 1:52 token recognition error at: ''??'
line 1:56 token recognition error at: '''
line 1:100 token recognition error at: ''??'
line 1:104 token recognition error at: '''

First error message is
> Task :app:kaptReleaseKotlin FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
* What went wrong:
Execution failed for task ':app:kaptReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
> java.lang.reflect.InvocationTargetException (no error message)

And second one is
2: Task failed with an exception.
* What went wrong:
Configuration cache problems found in this build.
1 problem was found storing the configuration cache.
- Task `:app:collectReleaseDependencies` of type `com.android.build.gradle.internal.tasks.PerModuleReportDependenciesTask`: invocation of 'Task.project' at execution time is unsupported.

Previously i didn't get these error

3 answers

1 accepted

0 votes
Answer accepted
Eren Alpaslan May 3, 2023

Adding -Dfile.encoding\=UTF-8 argument to jvmargs in gradle.properties solved my issue

org.gradle.jvmargs=-Xmx1536M -Dkotlin.daemon.jvm.options\="-Xmx1024M" -Dfile.encoding\=UTF-8

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2023

Hi @Eren Alpaslan and welcome to the community.

There are many possible causes for errors on builds that were previously successful, like changes in your code, changes in the Docker image used as a build container, third-party dependency changes.

You can check the following guide, specifically "Scenario 1: Builds were successful earlier, but started failing recently", for steps on how to troubleshoot the issues:

Kind regards,

Eren Alpaslan April 28, 2023

Thank you Theodora i will check this

Like Theodora Boudale likes this
0 votes
Eren Alpaslan April 26, 2023

Second issue which related with configuration cache solved by removing a single line from gradle.properties

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events