On a Gradle project, add a file called generated-kotlin-sources.gradle:
apply plugin: 'idea'
idea {
module {
sourceDirs += files(
'build/generated/source/kapt/main',
'build/generated/source/kaptKotlin/main',
'build/tmp/kapt/main/kotlinGenerated')
generatedSourceDirs += files(
'build/generated/source/kapt/main',
'build/generated/source/kaptKotlin/main',
'build/tmp/kapt/main/kotlinGenerated')
}
}
Then, in the build.gradle file, add the following content:
apply plugin: 'kotlin-kapt'
apply from: rootProject.file('gradle/generated-kotlin-sources.gradle')
Add a new dependency in the build.gradle file:
dependencies {
...
kapt 'io.arrow-kt:arrow-annotations-processor:0.5.2'
...
}
Once configured, you can generate Arrow code with a normal build command, ./gradlew build.