# Using Ollama and Kotlin to migrate multiple files into a new library

DevFeed: [Using Ollama and Kotlin to migrate multiple files into a new library](<https://devfeed.tech/articles/using-ollama-and-kotlin-to-migrate-multiple-files-into-a-new-library-28715.md>)

Original publisher: [Read original article](<https://le0nidas.gr/2025/03/09/using-ollama-and-kotlin-to-migrate-multiple-files-into-a-new-library/>)

Author: Leonidas Partsas

Published: 2025-03-09T16:26:35Z

Content type: tutorial

Language: en

Sources: [le0nidas](<https://devfeed.tech/sources/le0nidas.md>)

Topics: [Ollama](<https://devfeed.tech/topics/ollama.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [migration](<https://devfeed.tech/topics/migration.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Library](<https://devfeed.tech/topics/library.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [api](<https://devfeed.tech/tags/api.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [llm](<https://devfeed.tech/tags/llm.md>), [migration](<https://devfeed.tech/tags/migration.md>), [okhttp](<https://devfeed.tech/tags/okhttp.md>), [ollama](<https://devfeed.tech/tags/ollama.md>), [til](<https://devfeed.tech/tags/til.md>)

## AI overview

The article describes using Ollama with Kotlin to migrate a project from LoganSquare to kotlinx.serialization across multiple files. It outlines a workflow that loads file contents, sends them with prompts to a local LLM, and writes the results back, using OkHttp and kotlinx.serialization to communicate with Ollama.

## Source excerpt

At work, there is a need to migrate our project from using LoganSquare to kotlinx.serialization. Part of the work involves replacing the annotations the first library is using with the ones from the second. Unfortunately some cases are not as simple as replacing foo with boo. For example, a property must be annotated with @JsonField(name ... Continue reading Using Ollama and Kotlin to migrate multiple files into a new library ->