Configure with gradle
as below.
repository:
mavenCentral()
plugin
plugins{ // Minimum version: kt `1.8.0`, ksp `1.8.0-1.0.9`. // keep the prefix same with your kotlin version. // here supposes your kotlin plugin is at '1.8.0' id("com.google.devtools.ksp") version "1.8.0-1.0.9" }
add this part directly, rather than insert messily.
//region tracer // options // ksp.arg("tracer.internal", "") tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { kotlinOptions.freeCompilerArgs += '-Xcontext-receivers' } dependencies { implementation 'io.github.shawxingkwok:tracer-annotations:1.0.0' ksp 'io.github.shawxingkwok:tracer-compiler:1.0.0-1.0.0' } //endregion
//region tracer // options // ksp.arg("tracer.internal", "") tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { kotlinOptions.freeCompilerArgs += "-Xcontext-receivers" } dependencies { implementation ("io.github.shawxingkwok:tracer-annotations:1.0.0") ksp ("io.github.shawxingkwok:tracer-compiler:1.0.0-1.0.0") } //endregion
For the librarytracer-compiler
, common version styles like1.0.3
are deprecated. Use1.0.0-1.0.0
instead, in which the former is anchored to the version oftracer-annotatinos
.