This repository has been archived by the owner on May 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
60 lines (52 loc) · 1.46 KB
/
build.gradle
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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.31'
id 'application'
id 'java'
id 'org.jetbrains.compose' version '0.3.2'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.31'
}
repositories {
mavenCentral()
jcenter()
maven { url "https://maven.pkg.jetbrains.space/public/p/compose/dev" }
maven { url 'https://jitpack.io' }
}
//create a single Jar with all dependencies
jar {
duplicatesStrategy(duplicatesStrategy.INHERIT)
manifest {
attributes "Main-Class": "mainpack.KotlinAppKt"
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
compileKotlin {
kotlinOptions.useIR = true
kotlinOptions {
jvmTarget = "1.8"
}
}
task shipJar(dependsOn: ['copyRes', 'copyREADME', 'jar']) {
}
task copyRes(type: Copy) {
from("$projectDir/res")
into("$projectDir/build/libs/res")
}
task copyREADME(type: Copy) {
from("$projectDir/README.md");
into("$projectDir/build/libs")
}
dependencies {
implementation 'org.jetbrains:annotations-java5:20.1.0'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0'
implementation(compose.desktop.currentOs)
implementation "org.jetbrains.kotlin:kotlin-reflect:1.4.32"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.4.30"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}