1
- import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
2
- import org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute
3
1
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
4
2
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
5
3
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
6
4
import org.springframework.boot.gradle.tasks.bundling.BootJar
7
5
8
- val kotlinVersion = rootProject.properties[" systemProp.kotlinVersion" ] ? : throw IllegalStateException (" kotlinVersion is not specified" )
9
- val kotlinIdeVersion: String by System .getProperties()
10
- val kotlinIdeVersionSuffix: String by System .getProperties()
11
6
val 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()
15
7
16
8
group = " com.compiler.server"
17
9
version = " $kotlinVersion -SNAPSHOT"
18
10
java.sourceCompatibility = JavaVersion .VERSION_17
19
11
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
50
12
val 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
- }
66
13
67
14
plugins {
68
15
id(" org.springframework.boot" ) version " 2.7.10"
@@ -91,6 +38,8 @@ allprojects {
91
38
maven(" https://www.myget.org/F/rd-snapshots/maven/" )
92
39
maven(" https://kotlin.jetbrains.space/p/kotlin/packages/maven/kotlin-ide" )
93
40
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" )
94
43
}
95
44
afterEvaluate {
96
45
dependencies {
@@ -105,22 +54,6 @@ allprojects {
105
54
}
106
55
107
56
dependencies {
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
-
124
57
annotationProcessor(" org.springframework:spring-context-indexer" )
125
58
implementation(" com.google.code.gson:gson" )
126
59
implementation(" org.springframework.boot:spring-boot-starter-web" )
@@ -163,9 +96,12 @@ fun generateProperties(prefix: String = "") = """
163
96
indexes.file=${prefix + indexes}
164
97
indexesJs.file=${prefix + indexesJs}
165
98
indexesWasm.file=${prefix + indexesWasm}
99
+ indexesComposeWasm.file=${prefix + indexesComposeWasm}
166
100
libraries.folder.jvm=${prefix + libJVMFolder}
167
101
libraries.folder.js=${prefix + libJSFolder}
168
102
libraries.folder.wasm=${prefix + libWasmFolder}
103
+ libraries.folder.compose-wasm=${prefix + libComposeWasmFolder}
104
+ libraries.folder.compose-wasm-compiler-plugins=${prefix + libComposeWasmCompilerPluginsFolder}
169
105
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
170
106
server.compression.enabled=true
171
107
server.compression.mime-types=application/json
@@ -182,9 +118,11 @@ tasks.withType<KotlinCompile> {
182
118
freeCompilerArgs = listOf (" -Xjsr305=strict" )
183
119
jvmTarget = " 17"
184
120
}
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" )
188
126
dependsOn(" :executors:jar" )
189
127
dependsOn(" :indexation:run" )
190
128
buildPropertyFile()
@@ -208,9 +146,11 @@ val buildLambda by tasks.creating(Zip::class) {
208
146
from(indexes)
209
147
from(indexesJs)
210
148
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) }
214
154
into(" lib" ) {
215
155
from(configurations.compileClasspath) { exclude(" tomcat-embed-*" ) }
216
156
}
0 commit comments