Annotations
Telereso plugin offers some useful annotations to support the kmp structure ,
Some of this annotations can be used in other project structures too like @Builder
Repo
For any issues or ideas you can check the repo kmp-annotations
Setup
To be able to use Telereso annotations you need to add the kmp plugin
Latest version
gradle.properties in your root project properties file , add
#Telereso
teleresoKmpVersion=<latest-version>
settings.gradle.kts
Make sure you have this in your root project settings.gradle.kts
file
pluginManagement {
val teleresoKmpVersion: String by settings
plugins {
id("io.telereso.kmp") version teleresoKmpVersion apply false
}
repositories {
google()
gradlePluginPortal()
mavenCentral()
}
}
module/build.gradle.kts
lib/build.gradle.kts
Now you can use the plugin in your module’s build.gradle.kts
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.multiplatform")
kotlin("plugin.serialization")
id("io.telereso.kmp") // <---- no need to add version
}
Configuration
The plugin has some configuration you can enable or disable , you can control them in the plugin’s DSL section inside your module’s build.gradle.kts
teleresoKmp {
// set to true to stop generated model files with json converters extensions
disableJsonConverters = true
// set to true to stop copying generated reactNative files react native dir
disableReactExport = true
// set to true to stop copying generated flutter files into flutter dir
disableFlutterExport = true
}
Kmp modules
The plugin is aware of kmp structure so some configurations might be disabled/enabled accordingly so use above flags to override default configs or if you using it in your own structure.