-
Notifications
You must be signed in to change notification settings - Fork 20
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
Created a metadata rule to replace composed-jar attribute by jar. #802
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,13 @@ buildscript { | |
ext.ideaVersion = ideaVersion | ||
ext.kotlinVersion = kotlinVersion | ||
ext.java_version = "17" | ||
|
||
// Should be in buildSrc ideally | ||
//dependencies { | ||
// classpath(gradleApi()) { | ||
// because("Creates a dependency on the API of the current version of Gradle, so that we can create Gradle plugins.") | ||
// } | ||
//} | ||
} | ||
|
||
plugins { | ||
|
@@ -33,7 +40,34 @@ tasks.withType(Test) { | |
environment 'GRADLE_RELEASE_REPOSITORY','https://services.gradle.org/distributions' | ||
} | ||
|
||
// Should be in buildSrc ideally | ||
//@CacheableRule | ||
//abstract class ComposedJarRule implements ComponentMetadataRule { | ||
// @Inject abstract ObjectFactory getObjects() | ||
// | ||
// void execute(ComponentMetadataContext context) { | ||
// context.details.withVariant("intellijPlatformComposedJar") { | ||
// attributes { | ||
// attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements, LibraryElements.JAR)) | ||
// } | ||
// } | ||
// } | ||
//} | ||
|
||
dependencies { | ||
//components { | ||
// withModule("com.redhat.devtools.intellij:intellij-common", ComposedJarRule) | ||
//} | ||
components { | ||
withModule("com.redhat.devtools.intellij:intellij-common") { | ||
withVariant("intellijPlatformComposedJar") { | ||
attributes { | ||
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements, LibraryElements.JAR)) | ||
} | ||
} | ||
} | ||
} | ||
|
||
implementation( | ||
"com.redhat.devtools.intellij:intellij-common:${intellijCommonVersion}", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just noticed another api which might work you can try: implementation("com.redhat.devtools.intellij:intellij-common:${intellijCommonVersion}") {
attributes {
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named("composed-jar"))
}
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tested it in a different PR where I needed this: df398b4 Works super nicely. I'll add you as co-author to my PR. Thanks! |
||
"io.fabric8:kubernetes-client:${kubernetesClientVersion}", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created two versions, feel free to use whatever you like.