Skip to content

Commit 82aedc1

Browse files
Created a metadata rule to replace composed-jar attribute by jar.
1 parent 43b450d commit 82aedc1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

build.gradle

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ buildscript {
22
ext.ideaVersion = ideaVersion
33
ext.kotlinVersion = kotlinVersion
44
ext.java_version = "17"
5+
6+
// Should be in buildSrc ideally
7+
//dependencies {
8+
// classpath(gradleApi()) {
9+
// because("Creates a dependency on the API of the current version of Gradle, so that we can create Gradle plugins.")
10+
// }
11+
//}
512
}
613

714
plugins {
@@ -33,7 +40,34 @@ tasks.withType(Test) {
3340
environment 'GRADLE_RELEASE_REPOSITORY','https://services.gradle.org/distributions'
3441
}
3542

43+
// Should be in buildSrc ideally
44+
//@CacheableRule
45+
//abstract class ComposedJarRule implements ComponentMetadataRule {
46+
// @Inject abstract ObjectFactory getObjects()
47+
//
48+
// void execute(ComponentMetadataContext context) {
49+
// context.details.withVariant("runtimeElements") {
50+
// attributes {
51+
// attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements, "composed-jar"))
52+
// }
53+
// }
54+
// }
55+
//}
56+
3657
dependencies {
58+
//components {
59+
// withModule("com.redhat.devtools.intellij:intellij-common", ComposedJarRule)
60+
//}
61+
components {
62+
withModule("com.redhat.devtools.intellij:intellij-common") {
63+
withVariant("runtimeElements") {
64+
attributes {
65+
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements, LibraryElements.JAR))
66+
}
67+
}
68+
}
69+
}
70+
3771
implementation(
3872
"com.redhat.devtools.intellij:intellij-common:${intellijCommonVersion}",
3973
"io.fabric8:kubernetes-client:${kubernetesClientVersion}",

0 commit comments

Comments
 (0)