This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
/
build.gradle
118 lines (102 loc) · 3.49 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
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
import org.apache.tools.ant.taskdefs.condition.Os
buildscript {
repositories {
mavenLocal()
jcenter()
maven { url "https://dl.bintray.com/korlibs/korlibs" }
maven { url "https://dl.bintray.com/soywiz/soywiz" }
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
maven { url "https://dl.bintray.com/kotlin/kotlinx" }
maven { url "https://dl.bintray.com/kotlin/ktor" }
maven { url "https://plugins.gradle.org/m2" }
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
//classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
plugins {
id 'org.jetbrains.kotlin.multiplatform' version "$kotlinVersion" apply false
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlinVersion" apply false
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url "https://dl.bintray.com/korlibs/korlibs" }
maven { url "https://dl.bintray.com/soywiz/soywiz" }
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
maven { url "https://dl.bintray.com/kotlin/kotlinx" }
maven { url "https://dl.bintray.com/kotlin/ktor" }
maven { url "https://plugins.gradle.org/m2" }
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" }
}
}
subprojects {
apply plugin: "kotlin-multiplatform"
apply plugin: "kotlinx-serialization"
kotlin {
jvm {
[compilations.main, compilations.test]*.kotlinOptions {
// Setup the Kotlin compiler options for the 'main' compilation:
jvmTarget = "1.8"
}
}
js {
browser()
[compilations.main, compilations.test]*.kotlinOptions {
languageVersion = "1.4"
//sourceMap = true
sourceMap = false
metaInfo = true
moduleKind = "umd"
//moduleKind = "amd"
main = "call"
}
}
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib-common')
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationRuntimeVersion"
}
}
}
}
}
apply plugin: 'idea'
idea {
module {
excludeDirs = [file("@old"), file(web_dir)]
}
}
task baseDeploy(type: Task) {
doLast {
exec {
commandLine "rsync",
"-av",
"Dockerfile",
"docker-compose.yml",
"mmo/build/libs/mmo.jar",
"web",
"soywiz:/home/virtual/soywiz/mmo.soywiz.com/"
}
}
}
task deploy(dependsOn: ":mmo:jvmFatJar") {
finalizedBy baseDeploy
}
/*
task runAll(dependsOn: [":mmo-js:buildAndCopy", ":mmo-jvm:shadowJar", ":mmo-jvm:runServer"]) {
}
task copyFatJar(dependsOn: [":mmo-jvm:build", ":mmo-jvm:shadowJar", ":mmo-js:buildAndCopy"], type: Copy) {
from "${rootProject.rootDir}/mmo/jvm/build/libs/mmo-server.jar"
into "${rootProject.rootDir}"
}
task copyFatJarAndRunAll(dependsOn: [copyFatJar, runAll]) {
}
*/