Comments (2)
Wow, that is annoying...
Running buildEnvironment
in the subproject where I'm applying the plugin and the root project doesn't give a kotlinpoet version below 1.16.0
, but adding alias(libs.plugins.wire) apply false
to the root project's plugins
as suggested does indeed fix the issue.
The other plugin I have that brings in kotlinpoet
is sqldelight 2.0.1
, which depends on kotlinpoet 1.15.2
. If I do the opposite, just adding alias(libs.plugins.sqldelight) apply false
to the root project, then I see 1.15.2
in the root project's buildEnvironment
task.
If I add both, then dependency resolution happens as expected and resolves both to kotlinpoet 1.16.0
. I wonder if adding every possible plugin with apply false
to the root project is unfortunately the way to avoid this, even if they're only used by a single (or a few) subprojects?
Thank you for the workaround and the explanation, doesn't look like there's anything wire
can do here.
from wire.
wire-kotlin-generator 4.9.6 depends on kotlinpoet-jvm 1.16.0: https://search.maven.org/artifact/com.squareup.wire/wire-kotlin-generator/4.9.6/jar
And kotlinpoet 1.16.0 is the version which added that API: https://github.com/square/kotlinpoet/releases/tag/1.16.0
I didn't try it myself, but I suspect running buildEnvironment
will show you something that's forcing your kotlinpoet dependency to an older version. In my experience this happens through the use of the plugins
block which has absolutely (and ironically) destroyed the semantics of dependency resolution on the buildscript classpath.
You seem to be applying the plugin only to a single subproject: https://github.com/alexvanyo/composelife/blob/c023f9f9df90b4fbc1013248552623d6f0f07122/preferences-proto/build.gradle.kts#L21
This means that any other plugin which beats that plugin to the buildscript classpath will get its version of KotlinPoet and break Wire. For a quick fix, apply the Wire plugin in the root project with apply false
and add another scar to the set of those caused by the plugins
block's broken semantics.
from wire.
Related Issues (20)
- Pass dependencies symbolically to WireTask for better Gradle caching HOT 1
- when i generate kotlin code ,how can i set value on val params. HOT 3
- Why does Wire throw and not fallback to the default value if a required enum value is missing? HOT 5
- Wire proto schema generation broken for protobuf messages containing a map with "protobuf.Any" type fields on versions >= 4.9.4 HOT 4
- NoSuchMethodError for java.lang.Constructor#getParameterCount HOT 4
- Compiling a proto that uses a vendored descriptor.proto HOT 3
- Proto generation fails on Windows with trailing comments
- Crash on annotations.proto HOT 8
- `srcDir` should accept `TaskProvider`
- Accept binary DescriptorProto as input HOT 4
- JavaScript name hashCode is generated for different inherited members [Kotlin Multiplatform] [JS] HOT 2
- Wire adds generated sources to the sourceset two too many times HOT 1
- Add support for Api, FieldMask, SourceContext, and Type from protobuf's `.proto' files. HOT 5
- iOS Client HOT 1
- Poor colour contrast for headers on docs site HOT 4
- FieldOptions.wire_name to dodge name collisions on options
- Crash when parsing packed `repeated uint64` field with length 0 in Swift HOT 5
- java.lang.IllegalStateException: too early; can't read the trailers yet HOT 7
- Malformed packed varints read beyond field length HOT 2
- Building Kotlin (.kt) files with wire-compiler via command line?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wire.