# ClassCastException on 4.4.0.3356

**URL:** <https://community.sonarsource.com/t/classcastexception-on-4-4-0-3356/101945>\
**Category:** SonarQube Cloud\
**Tags:** gradle, android, scanner\
**Created:** [October 4, 2023, 6:09am UTC](https://community.sonarsource.com/t/classcastexception-on-4-4-0-3356/101945 "2023-10-04T06:09:56Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![angelo.buono](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/angelo.buono/32/44736_2.png) [@angelo.buono](https://community.sonarsource.com/u/angelo.buono)\
**Post date:** [October 9, 2023, 8:52am UTC](https://community.sonarsource.com/t/classcastexception-on-4-4-0-3356/101945/4 "2023-10-09T08:52:40Z")

</div>

Hello @Laurynas, welcome to the Sonar Community.

Usually, the Sonar Scanner Gradle plugin is able to detect sources automatically, so there should be no need for `property(“sonar.sources”, “${project.projectDir}/src/main/kotlin”) `. Could you please run the scan without setting the property? Does the issue still happen?

A second option is to replace `property(“sonar.sources”, “${project.projectDir}/src/main/kotlin”)` with `property("sonar.sources", listOf("${ project.projectDir }/src/main/kotlin"))`.

In case the problem is not solved, can you provide us with a small reproducer? A small project that we can easily run on our side to reproduce this issue.

Cheers,

Angelo

---

_[View the full topic](https://community.sonarsource.com/t/classcastexception-on-4-4-0-3356/101945)._
