@@ -41,9 +41,17 @@ allprojects {
4141 maven(" https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental" )
4242 maven(" https://maven.pkg.jetbrains.space/public/p/compose/dev" )
4343 }
44- afterEvaluate {
45- dependencies {
46- dependencies {
44+ }
45+
46+ setOf (
47+ rootProject,
48+ project(" :common" ),
49+ project(" :executors" ),
50+ project(" :indexation" ),
51+ ).forEach { project ->
52+ project.afterEvaluate {
53+ project.dependencies {
54+ project.dependencies {
4755 implementation(" com.fasterxml.jackson.module:jackson-module-kotlin:2.15.2" )
4856 implementation(libs.kotlin.idea) {
4957 isTransitive = false
@@ -58,6 +66,31 @@ val resourceDependency: Configuration by configurations.creating {
5866 isCanBeConsumed = false
5967}
6068
69+
70+ val kotlinComposeWasmIcLocalCache: Configuration by configurations.creating {
71+ isTransitive = false
72+ isCanBeResolved = true
73+ isCanBeConsumed = false
74+ attributes {
75+ attribute(
76+ CacheAttribute .cacheAttribute,
77+ CacheAttribute .LOCAL
78+ )
79+ }
80+ }
81+
82+ val kotlinComposeWasmIcLambdaCache: Configuration by configurations.creating {
83+ isTransitive = false
84+ isCanBeResolved = true
85+ isCanBeConsumed = false
86+ attributes {
87+ attribute(
88+ CacheAttribute .cacheAttribute,
89+ CacheAttribute .LAMBDA
90+ )
91+ }
92+ }
93+
6194dependencies {
6295 annotationProcessor(" org.springframework:spring-context-indexer" )
6396 implementation(" com.google.code.gson:gson" )
@@ -85,6 +118,9 @@ dependencies {
85118 testImplementation(libs.kotlinx.coroutines.test)
86119
87120 resourceDependency(libs.skiko.js.wasm.runtime)
121+
122+ kotlinComposeWasmIcLocalCache(project(" :cache-maker" ))
123+ kotlinComposeWasmIcLambdaCache(project(" :cache-maker" ))
88124}
89125
90126fun buildPropertyFile () {
@@ -109,6 +145,7 @@ fun generateProperties(prefix: String = "") = """
109145 libraries.folder.compose-wasm=${prefix + libComposeWasm}
110146 libraries.folder.compose-wasm-compiler-plugins=${prefix + libComposeWasmCompilerPlugins}
111147 libraries.folder.compiler-plugins=${prefix + compilerPluginsForJVM}
148+ caches.folder.compose-wasm=${prefix + cachesComposeWasm}
112149 spring.mvc.pathmatch.matching-strategy=ant_path_matcher
113150 server.compression.enabled=true
114151 server.compression.mime-types=application/json,text/javascript,application/wasm
@@ -120,6 +157,7 @@ tasks.withType<KotlinCompile> {
120157 }
121158 dependsOn(" :executors:jar" )
122159 dependsOn(" :indexation:run" )
160+ dependsOn(kotlinComposeWasmIcLocalCache)
123161 buildPropertyFile()
124162}
125163println (" Using Kotlin compiler ${libs.versions.kotlin.get()} " )
@@ -131,7 +169,7 @@ tasks.withType<BootJar> {
131169
132170val buildLambda by tasks.creating(Zip ::class ) {
133171 val propertyFile = propertyFile
134- val propertyFileContent = generateProperties(" /var/task/ " )
172+ val propertyFileContent = generateProperties(lambdaPrefix )
135173
136174 from(tasks.compileKotlin)
137175 from(tasks.processResources) {
@@ -152,6 +190,7 @@ val buildLambda by tasks.creating(Zip::class) {
152190 from(libJVMFolder) { into(libJVM) }
153191 from(compilerPluginsForJVMFolder) {into(compilerPluginsForJVM)}
154192 from(libComposeWasmCompilerPluginsFolder) { into(libComposeWasmCompilerPlugins) }
193+ from(kotlinComposeWasmIcLambdaCache)
155194 into(" lib" ) {
156195 from(configurations.compileClasspath) { exclude(" tomcat-embed-*" ) }
157196 }
0 commit comments