-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
94 lines (67 loc) · 2.03 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("com.github.jengelman.gradle.plugins:shadow:5.2.0")
}
}
allprojects {
version = "0.1.2"
}
description = "Proc Gen"
subprojects {
apply(plugin = "java")
apply(plugin = "com.github.johnrengelman.shadow")
ext {
set("msengineVersion", "1.0.8-SNAPSHOT")
set("sutilVersion", "1.1.1-SNAPSHOT")
}
repositories {
mavenCentral {
metadataSources {
mavenPom()
ignoreGradleMetadataRedirection()
}
}
maven {
url = uri("https://oss.sonatype.org/content/groups/public/")
metadataSources {
mavenPom()
ignoreGradleMetadataRedirection()
}
}
}
dependencies {
"implementation"("fr.theorozier:sutil:${project.ext["sutilVersion"]}")
"implementation"("fr.theorozier:msengine-common:${project.ext["msengineVersion"]}")
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
}
tasks.named<JavaCompile>("compileJava") {
options.encoding = "UTF-8"
}
tasks.named<ShadowJar>("shadowJar") {
exclude("*.dll.git", "*.dll.sha1")
exclude("*.dylib.git", "*.dylib.sha1")
exclude("*.so.git", "*.so.sha1")
}
tasks.register("showConf") {
configurations.named("runtimeClasspath").get().forEach { println(it) }
}
}
tasks.create<Copy>("distrib") {
group = "shadow"
dependsOn("pg-client:shadowJar", "pg-server:shadowJar")
from(
project("pg-client").tasks.named<ShadowJar>("shadowJar").get().archiveFile,
project("pg-server").tasks.named<ShadowJar>("shadowJar").get().archiveFile
)
into("build/libs")
}