Skip to content

Instantly share code, notes, and snippets.

@ksharma-xyz
Created July 6, 2024 11:41
Show Gist options
  • Save ksharma-xyz/1988b4f701a4070c3404a4ad33418716 to your computer and use it in GitHub Desktop.
Save ksharma-xyz/1988b4f701a4070c3404a4ad33418716 to your computer and use it in GitHub Desktop.
How to add Wire Plugin to Gradle File
// In libs.versions.toml
wire = { id = "com.squareup.wire", version.ref = "wire"}
// In build.gradle.kts (module level)
plugins {
alias(libs.plugins.wire)
}
wire {
kotlin {
javaInterop = true
out = "$projectDir/build/generated/source/wire"
}
protoPath {
srcDir("src/main/proto")
}
sourcePath {
srcDir("src/main/proto")
}
// For complete Kotlin configuration refer: https://square.github.io/wire/wire_compiler/#kotlin
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment