# SonarCloud with multi module Android project (Java + Kotlin) using Kotlin KTS

**URL:** <https://community.sonarsource.com/t/sonarcloud-with-multi-module-android-project-java-kotlin-using-kotlin-kts/44159>\
**Category:** SonarQube Cloud\
**Tags:** docs-gap-fixed, multi-module, android, kotlin\
**Created:** [June 2, 2021, 8:54am UTC](https://community.sonarsource.com/t/sonarcloud-with-multi-module-android-project-java-kotlin-using-kotlin-kts/44159 "2021-06-02T08:54:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tosulc](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tosulc/32/22729_2.png) [@tosulc](https://community.sonarsource.com/u/tosulc)\
**Post date:** [June 2, 2021, 8:54am UTC](https://community.sonarsource.com/t/sonarcloud-with-multi-module-android-project-java-kotlin-using-kotlin-kts/44159/1 "2021-06-02T08:54:17Z")

</div>

We’re using Github as source control and Jenkins as CI system. Our Android project consists of Java (66%) and Kotlin (34%), it’s split into multiple modules (\>10) and we’re using Kotlin KTS for syncing dependencies.

My question, how do you setup sonar cloud dependency for such project? I’m only seeing documentation for setting up in Groovy-based manner.

---

<div class="post-metadata">

**Author:** ![janos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/janos/32/60_2.png) [@janos](https://community.sonarsource.com/u/janos)\
**Post date:** [June 3, 2021, 9:41am UTC](https://community.sonarsource.com/t/sonarcloud-with-multi-module-android-project-java-kotlin-using-kotlin-kts/44159/3 "2021-06-03T09:41:36Z")

</div>

Welcome to the community!

Just to clarify, is your question about this kind of snippet in our tutorial for analyzing with Gradle?

```auto
plugins {
  id "org.sonarqube" version "3.2.0"
}

sonarqube {
  properties {
    property "sonar.projectKey", "your-project-key"
    property "sonar.organization", "your-organization-key"
    property "sonar.host.url", "https://sonarcloud.io"
  }
}

```

And your question is that it would be nice to have the Kotlin flavor of this instead of Groovy flavor?

Or do you mean something else?

---

<div class="post-metadata">

**Author:** ![tosulc](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tosulc/32/22729_2.png) [@tosulc](https://community.sonarsource.com/u/tosulc)\
**Post date:** [June 3, 2021, 9:56pm UTC](https://community.sonarsource.com/t/sonarcloud-with-multi-module-android-project-java-kotlin-using-kotlin-kts/44159/4 "2021-06-03T21:56:57Z")

</div>

Yep. How would you write that Groovy code in Kotlin DSL? When I try, it returns errors in syncing dependencies and it won’t build the multi-module project.

---

<div class="post-metadata">

**Author:** ![janos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/janos/32/60_2.png) [@janos](https://community.sonarsource.com/u/janos)\
**Post date:** [June 4, 2021, 5:55am UTC](https://community.sonarsource.com/t/sonarcloud-with-multi-module-android-project-java-kotlin-using-kotlin-kts/44159/5 "2021-06-04T05:55:07Z")

</div>

The equivalent in Kotlin DSL would be:

```auto
plugins {
  id("org.sonarqube") version "3.1.1"
}

sonarqube {
  properties {
    property("sonar.projectKey", "your-project-key")
    property("sonar.organization", "your-organization-key")
    property("sonar.host.url", "https://sonarcloud.io")
  }
}

```

---

<div class="post-metadata">

**Author:** ![tosulc](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tosulc/32/22729_2.png) [@tosulc](https://community.sonarsource.com/u/tosulc)\
**Post date:** [June 4, 2021, 10:03am UTC](https://community.sonarsource.com/t/sonarcloud-with-multi-module-android-project-java-kotlin-using-kotlin-kts/44159/6 "2021-06-04T10:03:40Z")

</div>

Omg… sorry for wasting your time on this. Didn’t see the **version** and without it, it’s not able to sync the dependency.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [June 11, 2021, 10:04am UTC](https://community.sonarsource.com/t/sonarcloud-with-multi-module-android-project-java-kotlin-using-kotlin-kts/44159/7 "2021-06-11T10:04:05Z")

</div>

Closed on June 11, 2021, 10:04am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
