-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
67 lines (50 loc) · 1.79 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import org.sdkotlin.buildlogic.attributes.CustomResources.CUSTOM_RESOURCE
import org.sdkotlin.buildlogic.attributes.ResourceAttributes.applyResourceAttributes
plugins {
application
alias(libs.plugins.springboot.plugin)
id("org.sdkotlin.buildlogic.custom-resources-consumer")
id("org.sdkotlin.buildlogic.spring-project")
id("org.sdkotlin.buildlogic.test.integration-test-suite")
}
dependencies {
api(libs.springboot.starter)
implementation(projects.subprojects.timeLogger)
implementation(projects.subprojects.timeService)
implementation(projects.subprojects.componentScannedService)
implementation(libs.bundles.kotlinx.coroutines.jvm)
implementation(libs.log4j.api.kotlin)
implementation(libs.spring.beans)
implementation(libs.spring.context)
implementation(libs.spring.core)
implementation(libs.springboot)
implementation(libs.springboot.autoconfigure)
// A project with a transitive dependency on a project with a custom
// resources artifact.
runtimeOnly(projects.subprojects.customResourcesIntermediary)
integrationTestImplementation(libs.spring.beans)
integrationTestImplementation(libs.spring.context)
integrationTestImplementation(libs.spring.core)
integrationTestImplementation(libs.springboot.test)
integrationTestImplementation(libs.springboot.starter.test)
}
application {
mainClass = "org.sdkotlin.springdemo.SpringBootAppKt"
}
tasks {
register("printCustomClasspath") {
val fileCollection: FileCollection =
configurations.runtimeClasspath.get().incoming.artifactView {
lenient(false)
@Suppress("UnstableApiUsage")
withVariantReselection()
attributes {
applyResourceAttributes(objects, CUSTOM_RESOURCE)
}
}.files
doLast {
val customResourcesAsPath = fileCollection.asPath
println("customResourcesAsPath: $customResourcesAsPath")
}
}
}