You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this plugin and generating the proto by Wire, it will corrupt the Wire Gradle plugin "okio" library.
⚠️ Current behavior
Unable to find method ''okio.FileSystem okio.Okio.asResourceFileSystem(java.lang.ClassLoader)''
'okio.FileSystem okio.Okio.asResourceFileSystem(java.lang.ClassLoader)'
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
✅ Expected behavior
No error should occur during generating proto files.
💣 Steps to reproduce
build.gradle.kts
plugins {
kotlin("jvm") version "1.7.10"
id("com.squareup.wire") version "4.4.3"
idea
}
group ="org.example"
version ="1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
api("com.squareup.wire:wire-runtime:4.4.3")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.+")
}
wire {
sourcePath {
srcDir("src/proto")
}
kotlin {
}
}
idea {
module {
sourceDirs.add(project.file("src/proto"))
}
}
Put some arbitrary proto to the src/proto folder, then run the generateMainProtos task.
The text was updated successfully, but these errors were encountered:
Debugging showed that the plugin tries to call extension function ClassLoader.asResourceFileSystem() which is defined in okio:3.0 . Somehow RefreshVersions prevents this dependency to be loaded it seems.
Caused by: java.lang.NoSuchMethodError: 'okio.FileSystem okio.Okio.asResourceFileSystem(java.lang.ClassLoader)'
at com.squareup.wire.schema.CoreLoader$resourceFileSystem$2.invoke(CoreLoader.kt:34)
Seems like refreshVersions depends on okhttp v4.9.3 which also depends on com.squareup.okio:okio , however on v2.8.0; I suppose that is the issue. My project has a root settings.file using the RefreshVersions plugin, and the issue happens in a subproject, not sure if that is a factor.
🐛 Describe the bug
When using this plugin and generating the proto by Wire, it will corrupt the Wire Gradle plugin "okio" library.
✅ Expected behavior
No error should occur during generating proto files.
💣 Steps to reproduce
build.gradle.kts
Put some arbitrary proto to the
src/proto
folder, then run thegenerateMainProtos
task.The text was updated successfully, but these errors were encountered: