1- import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
2- import org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute
31import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
42import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
53import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
64import org.springframework.boot.gradle.tasks.bundling.BootJar
75
8- val kotlinVersion = rootProject.properties[" systemProp.kotlinVersion" ]
9- val kotlinIdeVersion: String by System .getProperties()
10- val kotlinIdeVersionSuffix: String by System .getProperties()
116val policy: String by System .getProperties()
12- val indexes: String by System .getProperties()
13- val indexesJs: String by System .getProperties()
14- val indexesWasm: String by System .getProperties()
157
168group = " com.compiler.server"
179version = " $kotlinVersion -SNAPSHOT"
1810java.sourceCompatibility = JavaVersion .VERSION_17
1911
20- val kotlinDependency: Configuration by configurations.creating {
21- isTransitive = false
22- }
23- val kotlinJsDependency: Configuration by configurations.creating {
24- isTransitive = false
25- attributes {
26- attribute(
27- KotlinPlatformType .attribute,
28- KotlinPlatformType .js
29- )
30- attribute(
31- KotlinJsCompilerAttribute .jsCompilerAttribute,
32- KotlinJsCompilerAttribute .ir
33- )
34- }
35- }
36-
37- val kotlinWasmDependency: Configuration by configurations.creating {
38- isTransitive = false
39- attributes {
40- attribute(
41- KotlinPlatformType .attribute,
42- KotlinPlatformType .wasm
43- )
44- }
45- }
46-
47- val libJSFolder = " $kotlinVersion -js"
48- val libWasmFolder = " $kotlinVersion -wasm"
49- val libJVMFolder = kotlinVersion
5012val propertyFile = " application.properties"
51- val jacksonVersionKotlinDependencyJar = " 2.14.0" // don't forget to update version in `executor.policy` file.
52-
53- val copyDependencies by tasks.creating(Copy ::class ) {
54- from(kotlinDependency)
55- into(libJVMFolder)
56- }
57- val copyJSDependencies by tasks.creating(Copy ::class ) {
58- from(kotlinJsDependency)
59- into(libJSFolder)
60- }
61-
62- val copyWasmDependencies by tasks.creating(Copy ::class ) {
63- from(kotlinWasmDependency)
64- into(libWasmFolder)
65- }
6613
6714plugins {
6815 id(" org.springframework.boot" ) version " 2.7.10"
@@ -91,6 +38,8 @@ allprojects {
9138 maven(" https://www.myget.org/F/rd-snapshots/maven/" )
9239 maven(" https://kotlin.jetbrains.space/p/kotlin/packages/maven/kotlin-ide" )
9340 maven(" https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap" )
41+ maven(" https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental" )
42+ maven(" https://maven.pkg.jetbrains.space/public/p/compose/dev" )
9443 }
9544 afterEvaluate {
9645 dependencies {
@@ -105,22 +54,6 @@ allprojects {
10554}
10655
10756dependencies {
108- kotlinDependency(" junit:junit:4.13.2" )
109- kotlinDependency(" org.hamcrest:hamcrest:2.2" )
110- kotlinDependency(" com.fasterxml.jackson.core:jackson-databind:$jacksonVersionKotlinDependencyJar " )
111- kotlinDependency(" com.fasterxml.jackson.core:jackson-core:$jacksonVersionKotlinDependencyJar " )
112- kotlinDependency(" com.fasterxml.jackson.core:jackson-annotations:$jacksonVersionKotlinDependencyJar " )
113- // Kotlin libraries
114- kotlinDependency(" org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion " )
115- kotlinDependency(" org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion " )
116- kotlinDependency(" org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion " )
117- kotlinDependency(" org.jetbrains.kotlin:kotlin-test:$kotlinVersion " )
118- kotlinDependency(" org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3" )
119- kotlinDependency(" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3" )
120- kotlinJsDependency(" org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion " )
121- kotlinJsDependency(" org.jetbrains.kotlin:kotlin-dom-api-compat:$kotlinVersion " )
122- kotlinWasmDependency(" org.jetbrains.kotlin:kotlin-stdlib-wasm-js:$kotlinVersion " )
123-
12457 annotationProcessor(" org.springframework:spring-context-indexer" )
12558 implementation(" com.google.code.gson:gson" )
12659 implementation(" org.springframework.boot:spring-boot-starter-web" )
@@ -163,9 +96,12 @@ fun generateProperties(prefix: String = "") = """
16396 indexes.file=${prefix + indexes}
16497 indexesJs.file=${prefix + indexesJs}
16598 indexesWasm.file=${prefix + indexesWasm}
99+ indexesComposeWasm.file=${prefix + indexesComposeWasm}
166100 libraries.folder.jvm=${prefix + libJVMFolder}
167101 libraries.folder.js=${prefix + libJSFolder}
168102 libraries.folder.wasm=${prefix + libWasmFolder}
103+ libraries.folder.compose-wasm=${prefix + libComposeWasmFolder}
104+ libraries.folder.compose-wasm-compiler-plugins=${prefix + libComposeWasmCompilerPluginsFolder}
169105 spring.mvc.pathmatch.matching-strategy=ant_path_matcher
170106 server.compression.enabled=true
171107 server.compression.mime-types=application/json
@@ -182,9 +118,11 @@ tasks.withType<KotlinCompile> {
182118 freeCompilerArgs = listOf (" -Xjsr305=strict" )
183119 jvmTarget = " 17"
184120 }
185- dependsOn(copyDependencies)
186- dependsOn(copyJSDependencies)
187- dependsOn(copyWasmDependencies)
121+ dependsOn(" :dependencies:copyDependencies" )
122+ dependsOn(" :dependencies:copyJSDependencies" )
123+ dependsOn(" :dependencies:copyWasmDependencies" )
124+ dependsOn(" :dependencies:copyComposeWasmDependencies" )
125+ dependsOn(" :dependencies:copyComposeWasmCompilerPlugins" )
188126 dependsOn(" :executors:jar" )
189127 dependsOn(" :indexation:run" )
190128 buildPropertyFile()
@@ -208,9 +146,11 @@ val buildLambda by tasks.creating(Zip::class) {
208146 from(indexes)
209147 from(indexesJs)
210148 from(indexesWasm)
211- from(libJSFolder) { into(libJSFolder) }
212- from(libWasmFolder) { into(libWasmFolder) }
213- from(libJVMFolder) { into(libJVMFolder) }
149+ from(libJSFolder) { into(libJS) }
150+ from(libWasmFolder) { into(libWasm) }
151+ from(libComposeWasmFolder) { into(libComposeWasm) }
152+ from(libJVMFolder) { into(libJVM) }
153+ from(libComposeWasmCompilerPluginsFolder) { into(libComposeWasmCompilerPlugins) }
214154 into(" lib" ) {
215155 from(configurations.compileClasspath) { exclude(" tomcat-embed-*" ) }
216156 }
0 commit comments