Comments (9)
Is there any workaround for this at this moment?
No, I think.
from binary-compatibility-validator.
@qwwdfsad I generated the tasks with the approach mentioned in the OP, but there should be a general apiBuild
, apiCheck
and apiDump
which depends on all respective targetApiBuild
(etc).
Maybe I can try to finish this fix tomorrow. Do you think this approach should be used? I could create a PR with it.
from binary-compatibility-validator.
My problem is with a KMP library that has jvm + Android as targets. 0.2.4
hasn't this problem so it was introduced in 0.3.0
from binary-compatibility-validator.
Is there any workaround for this at this moment?
from binary-compatibility-validator.
I am doing something wrong, I tried in my multiplatform library and it works, but tests fail :(
from binary-compatibility-validator.
Since 0.2.4 we've added support for a single Android target and then the plugin stopped to work for multiple JVM targets in a single multiplatform project.
I'm prototyping the solution and would like to receive feedback on the following behaviour:
For JVM-only and multiplatform project with a single JVM target, everything stays the same.
Now consider a multiplatform project with the following structure:
commonMain
\ MyClass.kt
jvmMain
\ JvmClass.kt
anotherJvmMain
\ AnotherJvmClass.kt
For now, when the plugin is applied and :apiDump
is executed, the following structure will be produced:
api
\ jvm
\ project-name-jvm.api // <- contains dump of MyClass and JvmClass
\ anotherJvm
\ project-name-anotherJvm.api // <- contains dump of MyClass and AnotherJvmClass
commonMain
... here everything stays the same...
from binary-compatibility-validator.
For JVM-only and multiplatform project with a single JVM target, everything stays the same.
At first this sounds appealing (previous commits of .api
files will play nice with new versions of binary-compatibility-validator) but then consider the situation of adding/removing JVM targets to an existing project.
With the Gradle plugins for kotlin("multiplatform")
and the other kotlin("*")
plugins, they all play really nice with each other. Swapping between them is as simple as reconfiguring sourceSets
(for the most part).
If the behavior (output directory structure) of binary-compatibility-validator is dependent on the number of JVM targets, then changing a project from (for example) kotlin("jvm")
to kotlin("multiplatform")
(with a jvm
and android
target), then suddenly the previous jvm
target .api
files will be generated in a new location (due to an additional JVM target being added).
I personally would prefer the structure always be consistent (whether 1 JVM target or many) — so always something like the last structure you described in your previous #38 (comment).
Unfortunately this will be rather jarring for users of previous versions of binary-compatibility-validator who upgrade, but it will be a one time change, rather than repeated changes anytime the number of JVM targets fluctuates between 1 or many.
Perhaps an option could be provided that enables/disables the previous (1 JVM target) behavior/structure, allowing developers to opt in (or out) of the new structure (and support for multiple JVM targets)?
from binary-compatibility-validator.
I'm prototyping the solution and would like to receive feedback on the following behaviour:
The described behaviour looks fine to me. The names can use the existing algorithms for target specific names, and might special case the default names to allow for backwards compatibility without depending on target counts.
from binary-compatibility-validator.
Fixed in 0.8.0-RC.
from binary-compatibility-validator.
Related Issues (20)
- Klib `.api` files could use some vertical spacing HOT 4
- Klib `.api` files should sort members above types HOT 4
- Why use the `.api` extension and not `.abi`? HOT 6
- Klib validation failing on CI but not locally HOT 5
- Klib validation failing with unexpected header line error HOT 1
- Make KLib validation related tasks public HOT 1
- Improve error message when the apiCheck fails due to missing klib dump file
- Klib validation may incorrectly handle projects with generated sources
- Use the Gradle Provider API to allow for lazy configuration HOT 1
- BCV Gradle Plugin should not depend on kotlin-compiler-embeddable HOT 1
- BCV tasks do not work for a project with generated sources when configuration cache is enabled
- org.gradle.api.InvalidUserDataException? HOT 2
- @JvmOverloads doesn't generate different methods for compose functions HOT 2
- Klib validation DSL for Groovy is different HOT 1
- Removal of default parameter is binary compatible but breaks runtime HOT 3
- `public` members of non-API supertype should be visible in the inheritor
- Unknown native target errors with Kotlin 2.0.0-RC1 HOT 4
- `KlibSignatureVersion.LATEST.toString()` is rendered as `KlibSignatureVersion(-2147483648)`
- Add Gradle version compatibility tests HOT 2
- Consider moving BCV to Kotlin repo HOT 2
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 binary-compatibility-validator.