This repository was archived by the owner on Dec 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
44 lines (38 loc) · 1.46 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
44 lines (38 loc) · 1.46 KB
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
plugins {
id("com.soywiz.korge")
kotlin("kapt") version "1.4.31"
}
korge {
targetJvm()
targetJs()
}
repositories {
maven("https://jitpack.io")
}
val ldtkApiVersion: String by project
kotlin {
sourceSets {
val commonMain by getting {
kotlin.srcDir("$buildDir/generated/source/kaptKotlin/main")
dependencies {
implementation("com.lehaine.kt-ldtk-api:ldtk-api:$ldtkApiVersion")
//implementation("com.lehaine:ldtk-api:$ldtkApiVersion") // local repo
}
}
val jvmMain by getting {
dependencies {
configurations.all { // kapt has an issue with determining the correct KMM library, so we need to help it
if (name.contains("kapt")) {
attributes.attribute(
org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType.attribute,
org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType.jvm // pass in the JVM
)
}
}
configurations["kapt"].dependencies.add(project.dependencies.create("com.lehaine.kt-ldtk-api:ldtk-processor:$ldtkApiVersion"))
//configurations["kapt"].dependencies.add(project.dependencies.create("com.lehaine:ldtk-processor:$ldtkApiVersion")) // local repo
}
}
}
}
tasks.getByName("compileKotlinMetadata").dependsOn("kaptKotlinJvm")