-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
137 lines (117 loc) · 4.32 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.10"
id("org.jetbrains.compose") version "1.6.11"
id("org.jetbrains.kotlin.plugin.serialization") version "1.6.21"
// Apply the application plugin to add support for building a CLI application in Java.
id("com.google.devtools.ksp") version "1.9.10-1.0.13"
id("org.jetbrains.kotlinx.kover") version "0.8.0"
}
group = "jp.toastkid.yobidashi4"
version = "1.0.0"
repositories {
google()
mavenCentral()
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
dependencies {
implementation(project(path = ":domain"))
implementation(project(path = ":presentation"))
implementation(project(path = ":infrastructure"))
implementation("org.jetbrains.compose.runtime:runtime:1.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.1")
implementation("org.slf4j:slf4j-api:2.0.6")
implementation("org.slf4j:slf4j-reload4j:2.0.6")
implementation("io.insert-koin:koin-core:3.3.2")
implementation("io.insert-koin:koin-annotations:1.0.3")
ksp("io.insert-koin:koin-ksp-compiler:1.0.3")
// Kover
kover(project(path = ":domain"))
kover(project(path = ":presentation"))
kover(project(path = ":infrastructure"))
}
allprojects {
repositories {
google()
mavenCentral()
}
apply(plugin = "kotlin")
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
testImplementation("io.mockk:mockk:1.10.6")
testRuntimeOnly("net.bytebuddy:byte-buddy:1.12.22")
}
tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = org.jetbrains.kotlin.config.JvmTarget.JVM_17.description
kotlinOptions.freeCompilerArgs = listOf("-Xjvm-default=all")
}
tasks.test {
maxParallelForks = Runtime.getRuntime().availableProcessors()
useJUnitPlatform()
jvmArgs(
"--add-opens", "java.base/java.nio.file=ALL-UNNAMED",
"--add-opens", "java.base/java.net=ALL-UNNAMED",
"--add-opens", "java.base/java.time=ALL-UNNAMED",
"--add-opens", "java.base/java.time.chrono=ALL-UNNAMED",
"--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED",
"--add-opens", "java.desktop/java.awt.dnd=ALL-UNNAMED"
)
}
}
kover {
reports {
total {
// common filters for all reports of all variants
filters {
// exclusions for reports
excludes {
// excludes class by fully-qualified JVM class name, wildcards '*' and '?' are available
classes("jp.toastkid.yobidashi4.infrastructure.di.*")
classes("*ComposableSingletons*")
classes("*\$inject\$*")
packages("org.koin.ksp.generated")
}
}
}
}
}
val libraryPath = "jcef-bundle/"
compose.desktop {
//"-Djava.library.path=$libraryPath"
application {
mainClass = "jp.toastkid.yobidashi4.main.MainKt"
nativeDistributions {
packageVersion = rootProject.version.toString()
description = "Yobidashi 4 is a Toast kid's super tool aop."
copyright = "(c) 2022 toastkidjp. All rights reserved."
vendor = "Toast kid"
//licenseFile.set(project.file("LICENSE.txt"))
//includeAllModules = true
modules("java.instrument", "java.sql", "jdk.unsupported")
outputBaseDir.set(project.rootDir.resolve("."))
targetFormats(
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Exe
)
windows {
iconFile.set(project.file("presentation/src/main/resources/images/icon.png"))
}
}
buildTypes.release {
proguard {
configurationFiles.from(project.file("compose-desktop.pro"))
obfuscate.set(true)
joinOutputJars.set(true)
}
}
}
}
/*TODO
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}*/