Skip to content

Commit 92c69a1

Browse files
committed
Code cleanup.
1 parent b0fe759 commit 92c69a1

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

build-logic/src/main/kotlin/org.sdkotlin.buildlogic.custom-resources-consumer.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import org.sdkotlin.buildlogic.attributes.ResourceAttributes.RESOURCE_ATTRIBUTE
55

66
dependencies {
77

8-
// Register a new attribute key for variant-aware consumption
9-
// of "custom" resources dependencies.
108
attributesSchema {
9+
// Register a new attribute key for variant-aware consumption of
10+
// "custom" resources dependencies.
1111
attribute(RESOURCE_ATTRIBUTE)
1212
}
1313

build-logic/src/main/kotlin/org/sdkotlin/buildlogic/attributes/ResourceAttributes.kt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import org.sdkotlin.buildlogic.attributes.ResourceAttributes.applyResourceAttrib
1818
/**
1919
* An attribute type for resource variants.
2020
*/
21-
interface ResourceAttributeType : Named {
21+
interface ResourceAttribute : Named {
2222
override fun getName(): String = "ResourceAttribute"
2323
}
2424

@@ -30,24 +30,23 @@ object ResourceAttributes {
3030
/**
3131
* An attribute for resource dependency variants.
3232
*/
33-
val RESOURCE_ATTRIBUTE: Attribute<ResourceAttributeType> =
33+
val RESOURCE_ATTRIBUTE: Attribute<ResourceAttribute> =
3434
Attribute.of(
3535
ResourceAttributes::class.qualifiedName!!,
36-
ResourceAttributeType::class.java
36+
ResourceAttribute::class.java
3737
)
3838

3939
/**
4040
* Helper function to set the standard attributes for resource dependency
4141
* variants.
4242
*/
4343
fun AttributeContainer.applyResourceAttributes(
44-
objectFactory: ObjectFactory,
44+
objects: ObjectFactory,
4545
resourceAttributeValue: String
4646
) {
47-
attribute(BUNDLING_ATTRIBUTE, objectFactory.named(EXTERNAL))
48-
attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objectFactory.named(RESOURCES))
49-
attribute(RESOURCE_ATTRIBUTE,
50-
objectFactory.named(resourceAttributeValue))
47+
attribute(BUNDLING_ATTRIBUTE, objects.named(EXTERNAL))
48+
attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(RESOURCES))
49+
attribute(RESOURCE_ATTRIBUTE, objects.named(resourceAttributeValue))
5150
}
5251
}
5352

subprojects/app/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ tasks {
4141

4242
register("printCustomClasspath") {
4343

44+
group = "custom"
45+
description = "Print the custom classpath"
46+
4447
val fileCollection: FileCollection =
4548
configurations.runtimeClasspath.get().incoming.artifactView {
4649

0 commit comments

Comments
 (0)