# Migration from apollo android to apollo kotlin 3.8.2

**URL:** <https://community.apollographql.com/t/migration-from-apollo-android-to-apollo-kotlin-3-8-2/7689>\
**Category:** Client SDKs\
**Tags:** kotlin\
**Created:** [July 8, 2024, 11:38am UTC](https://community.apollographql.com/t/migration-from-apollo-android-to-apollo-kotlin-3-8-2/7689 "2024-07-08T11:38:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkhat](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/tkhat/32/5155_2.png) [@tkhat](https://community.apollographql.com/u/tkhat)\
**Post date:** [July 8, 2024, 11:38am UTC](https://community.apollographql.com/t/migration-from-apollo-android-to-apollo-kotlin-3-8-2/7689/1 "2024-07-08T11:38:20Z")

</div>

Hello, again.

We have multi module project, during the migration from apollo android to apollo kotlin i am getting duplocate content root errors, in order to resolve these warrnings i have to add

```auto
outputDirConnection {
  connectKotlinSourceSet("test")
}

```

so with my understainding without this it generates kotlin models two times one time will be for main and second will be for the test package.  
after i add this in all of the module gradle file warning is gone but i wonder if there is a way to write this once in somewhere like a global file ? i dont want to have added this in like 40 modules.

---

<div class="post-metadata">

**Author:** ![mbonnin](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/mbonnin/32/13_2.png) [@mbonnin](https://community.apollographql.com/u/mbonnin)\
**Post date:** [July 8, 2024, 11:47am UTC](https://community.apollographql.com/t/migration-from-apollo-android-to-apollo-kotlin-3-8-2/7689/2 "2024-07-08T11:47:36Z")

</div>

Hi 👋 I would recommend to use convention plugins ([Sharing build logic between subprojects Sample](https://docs.gradle.org/current/samples/sample_convention_plugins.html)).

If you have 40 modules, chances are that you already have some shared configuration already for things like target JVM/Android versions? You can share the Apollo configuration there.

---

<div class="post-metadata">

**Author:** ![tkhat](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/tkhat/32/5155_2.png) [@tkhat](https://community.apollographql.com/u/tkhat)\
**Post date:** [July 8, 2024, 12:52pm UTC](https://community.apollographql.com/t/migration-from-apollo-android-to-apollo-kotlin-3-8-2/7689/3 "2024-07-08T12:52:13Z")

</div>

it will be nice but than i will lose flexibility to configure each module for services.  
we had two scheme some modules uses only one some of them uses both so is there any other option ?

---

<div class="post-metadata">

**Author:** ![mbonnin](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/mbonnin/32/13_2.png) [@mbonnin](https://community.apollographql.com/u/mbonnin)\
**Post date:** [July 8, 2024, 1:07pm UTC](https://community.apollographql.com/t/migration-from-apollo-android-to-apollo-kotlin-3-8-2/7689/4 "2024-07-08T13:07:50Z")

</div>

You can pass parameters to your convention plugins, either through custom extensions or plain function parameters. You can then wrap all the Apollo configuration in your convention plugin.

```kotlin
plugins {
  id("my.convention.plugin")
}

myConventionExtension {
  apolloSchema1()
  // or 
  apolloSchema2()
}

```

There is a small setup price to pay (you need to touch all your 40 modules once) but in the long run it’s a lot more maintainable as all the configuration happens in a centralized place.
