-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
100 lines (88 loc) · 2.21 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
plugins {
id 'java'
id 'org.spongepowered.plugin' version '0.9.0'
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'org.jetbrains.kotlin.jvm' version '1.4.21'
}
group = 'io.github.boogiemonster1o1'
version = '0.1.0'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
if (JavaVersion.current().isJava9Compatible()) {
it.options.release = 8
}
}
logger.lifecycle("Building ${rootProject.name} version ${project.version}")
repositories {
mavenCentral()
jcenter()
maven {
name = 'Sponge Maven'
url = 'https://repo.spongepowered.org/maven'
}
maven {
name = 'Jitpack'
url = "https://jitpack.io"
}
}
dependencies {
compileOnly 'com.google.code.gson:gson:2.8.0'
compile 'com.github.jearmstrong21:PESL:36498a1'
compile 'org.spongepowered:spongeapi:7.3.0'
annotationProcessor 'org.spongepowered:spongeapi:7.3.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
shadowJar {
exclude 'module-info.class'
exclude '**/module-info.class'
dependencies {
include(dependency('com.github.jearmstrong21:PESL:36498a1'))
include(dependency('org.jetbrains.kotlin:kotlin-stdlib'))
include(dependency('org.jetbrains.kotlin:kotlin-stdlib-jdk8'))
exclude(dependency('org.spongepowered:spongeapi:.*'))
}
relocate 'p0nki.pesl', 'io.github.boogiemonster1o1.palpebratingpesl.shaded.p0nki.pesl'
relocate 'kotlin', 'io.github.boogiemonster1o1.palpebratingpesl.shaded.kotlin'
}
task copyPlugin(type: Copy) {
from "build/libs/${archivesBaseName}-${version}-all.jar"
into "run/mods"
}
task cleanModsDir {
doLast {
def mods = file('run/mods')
if (mods.exists()) {
mods.deleteDir()
}
mods.mkdir()
}
}
tasks.build.finalizedBy(sourcesJar, copyPlugin)
tasks.clean.dependsOn(cleanModsDir)
sponge {
plugin {
id = 'palpebratingpesl'
meta {
name = rootProject.name
version = project.version
description = 'PESL Scripting'
}
}
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}