Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix deprecation warning by mangling attributes instead. #1367

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

autonomousapps
Copy link
Owner

No description provided.

@autonomousapps autonomousapps marked this pull request as ready for review January 29, 2025 22:37
@jjohannes
Copy link
Collaborator

My initial instinct would have been to change the USAGE attribute to something unknown. Because, in my understanding, that would render the variant completely unusable. But the current change looks more "correct" in a way. So if this works, I think it is good.

@autonomousapps
Copy link
Owner Author

My initial instinct would have been to change the USAGE attribute to something unknown. Because, in my understanding, that would render the variant completely unusable. But the current change looks more "correct" in a way. So if this works, I think it is good.

I feel like you're probably right. Bundling has some compatibility rules defined and I don't feel like looking them up -- it feels like kind of like a "secondary attribute" compared to Usage.

@autonomousapps autonomousapps force-pushed the trobalik.shadow-projects branch from 025a18f to 5ef4428 Compare January 30, 2025 19:29
Copy link

❌ Test workflow failed:

* Root buildHealth         : https://gradle.com/s/z7jpzl6wb2oak
* TestKit buildHealth      : 
* Non-functional tests     : 
* TestKit check            : 
* JVM functional tests     : 
* Android functional tests : 

@autonomousapps autonomousapps force-pushed the trobalik.shadow-projects branch from 5ef4428 to 633e278 Compare January 30, 2025 19:33
Copy link

❌ Test workflow failed:

* Root buildHealth         : https://gradle.com/s/bjqjip7bubri6
* TestKit buildHealth      : 
* Non-functional tests     : 
* TestKit check            : 
* JVM functional tests     : 
* Android functional tests : 

@autonomousapps
Copy link
Owner Author

Ah, updating the usage got me this error:

Could not resolve all dependencies for configuration ':runtimeClasspath'.
> Could not resolve com.autonomousapps:kotlin-editor-relocated:0.18.0.
  Required by:
      root project :
  > Consumable configurations with identical capabilities within a project (other than the default configuration) must have unique attributes, but configuration ':kotlin-editor-relocated:apiElements' and [configuration ':kotlin-editor-relocated:runtimeElements'] contain identical attribute sets. Consider adding an additional attribute to one of the configurations to disambiguate them.  Run the 'outgoingVariants' task for more details. For more information, please refer to https://docs.gradle.org/8.12.1/userguide/upgrading_version_7.html#unique_attribute_sets in the Gradle documentation.

@tresat I think this would be a useful first-class feature for Gradle, to support "hiding" the non-shadowed variants.

@autonomousapps autonomousapps force-pushed the trobalik.shadow-projects branch from 633e278 to d1f9edd Compare January 30, 2025 19:57
@autonomousapps autonomousapps merged commit f69b67a into main Jan 30, 2025
1 check passed
@autonomousapps autonomousapps deleted the trobalik.shadow-projects branch January 30, 2025 20:03
@tresat
Copy link

tresat commented Jan 30, 2025

Consumable configurations with identical capabilities within a project (other than the default configuration) must have unique attributes, but configuration ':kotlin-editor-relocated:apiElements' and [configuration ':kotlin-editor-relocated:runtimeElements'] contain identical attribute sets. Consider adding an additional attribute to one of the configurations to disambiguate them.

I forgot about this requirement. But, this error message is pretty good, it tells you exactly where the problem is and suggests how to solve it! (I think I added this one. 😄)

I think this would be a useful feature as well. I'll make us an issue for it.

@autonomousapps
Copy link
Owner Author

But, this error message is pretty good

💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants