-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
166 lines (146 loc) · 7.06 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
plugins {
kotlin("jvm") version "1.5.0"
id("org.jetbrains.dokka") version "1.4.10.2"
id("org.jlleitschuh.gradle.ktlint") version "9.4.1"
id("com.github.johnrengelman.shadow") version "6.1.0"
id("maven")
id("maven-publish")
}
group = "me.scoretwo"
version = "1.1.5-SNAPSHOT"
description = "FastScript is a Spigot plugin, which can run JavaScript-based scripts more efficiently."
defaultTasks = mutableListOf("ShadowJar", "publishToMavenLocal")
extra.apply {
set("commonsVersion", "2.0.15-SNAPSHOT")
set("kotlinVersion", "1.5.0")
}
allprojects {
repositories {
jcenter()
mavenCentral()
mavenLocal()
maven("http://mc3.roselle.vip:609/repository/maven-snapshots/")
maven("http://mc3.roselle.vip:609/repository/maven-public/")
maven("https://maven.aliyun.com/nexus/content/groups/public/")
maven("https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/")
maven("https://repo.spongepowered.org/maven")
maven("https://jitpack.io")
maven("https://hub.spigotmc.org/nexus/content/repositories/sonatype-nexus-snapshots/")
maven("https://repo.codemc.io/repository/maven-snapshots/")
maven("https://repo.codemc.io/repository/maven-public/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.opencollab.dev/maven-snapshots/")
}
group = rootProject.group
version = rootProject.version
description = rootProject.description
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
}
dependencies {
implementation(project(":FastScript-common"))
implementation(project(":version-control:FastScript-bukkit"))
implementation(project(":version-control:FastScript-bungee"))
implementation(project(":version-control:FastScript-sponge"))
implementation(project(":version-control:FastScript-velocity"))
implementation(project(":version-control:FastScript-nukkit"))
implementation("me.scoretwo:commons-sponge-plugin:${rootProject.extra.get("commonsVersion")}")
implementation("me.scoretwo:commons-bungee-plugin:${rootProject.extra.get("commonsVersion")}")
implementation("me.scoretwo:commons-bukkit-plugin:${rootProject.extra.get("commonsVersion")}")
implementation("me.scoretwo:commons-velocity-plugin:${rootProject.extra.get("commonsVersion")}")
implementation("me.scoretwo:commons-nukkit-plugin:${rootProject.extra.get("commonsVersion")}")
implementation("org.bstats:bstats-bukkit:1.8")
implementation("com.iroselle:cstats-bukkit:1.7")
implementation("org.bstats:bstats-bungeecord:1.8")
implementation("com.iroselle:cstats-bungeecord:1.7")
implementation("commons-io:commons-io:2.8.0")
implementation("commons-lang:commons-lang:2.6")
implementation("net.md-5:bungeecord-chat:1.16-R0.5-SNAPSHOT")
implementation("me.scoretwo:commons-syntaxes:${rootProject.extra.get("commonsVersion")}")
implementation("me.scoretwo:commons-server:${rootProject.extra.get("commonsVersion")}")
implementation("me.scoretwo:commons-bukkit-configuration:${rootProject.extra.get("commonsVersion")}")
}
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
dependencies {
include(dependency("org.jetbrains.kotlin:kotlin-stdlib"))
include(dependency(":FastScript-common"))
include(dependency(":FastScript-bukkit"))
include(dependency(":FastScript-bungee"))
include(dependency(":FastScript-sponge"))
include(dependency(":FastScript-velocity"))
include(dependency(":FastScript-nukkit"))
include(dependency("me.scoretwo:commons-velocity-plugin:${rootProject.extra.get("commonsVersion")}"))
include(dependency("me.scoretwo:commons-sponge-plugin:${rootProject.extra.get("commonsVersion")}"))
include(dependency("me.scoretwo:commons-bungee-plugin:${rootProject.extra.get("commonsVersion")}"))
include(dependency("me.scoretwo:commons-bukkit-plugin:${rootProject.extra.get("commonsVersion")}"))
include(dependency("me.scoretwo:commons-nukkit-plugin:${rootProject.extra.get("commonsVersion")}"))
include(dependency("org.bstats:bstats-bukkit:1.8"))
include(dependency("com.iroselle:cstats-bukkit:1.7"))
include(dependency("org.bstats:bstats-bungeecord:1.8"))
include(dependency("com.iroselle:cstats-bungeecord:1.7"))
include(dependency("net.md-5:bungeecord-chat:1.16-R0.5-SNAPSHOT"))
include(dependency("commons-io:commons-io:2.8.0"))
include(dependency("commons-lang:commons-lang:2.6"))
include(dependency("me.scoretwo:commons-syntaxes:${rootProject.extra.get("commonsVersion")}"))
include(dependency("me.scoretwo:commons-server:${rootProject.extra.get("commonsVersion")}"))
include(dependency("me.scoretwo:commons-bukkit-configuration:${rootProject.extra.get("commonsVersion")}"))
}
relocate("kotlin", "me.scoretwo.utils.shaded.kotlin")
relocate("org.apache","me.scoretwo.utils.shaded.org.apache")
relocate("org.bstats","me.scoretwo.utils.shaded.org.bstats")
relocate("com.iroselle.cstats","me.scoretwo.utils.shaded.com.iroselle.cstats")
exclude("META-INF/versions/9/module-info.class")
exclude("META-INF/*.kotlin_module")
exclude("mojang-translations/*.*")
classifier = null
}
tasks.processResources {
from("src/main/resources") {
include("plugin.yml")
expand(mapOf(
"name" to rootProject.name,
"main" to "${rootProject.group}.${rootProject.name.toLowerCase()}.bukkit.BukkitBootStrap",
"version" to rootProject.version,
"description" to rootProject.description
))
}
from("src/main/resources") {
include("bungee.yml")
expand(mapOf(
"name" to rootProject.name,
"main" to "${rootProject.group}.${rootProject.name.toLowerCase()}.bungee.BungeeBootStrap",
"version" to project.version,
"description" to project.description
))
}
from("src/main/resources") {
include("mcmod.info")
expand(mapOf(
"id" to rootProject.name.toLowerCase(),
"name" to rootProject.name,
"version" to project.version,
"description" to project.description
))
}
from("src/main/resources") {
include("velocity-plugin.json")
expand(mapOf(
"id" to rootProject.name.toLowerCase(),
"name" to rootProject.name,
"version" to project.version,
"main" to "${rootProject.group}.${rootProject.name.toLowerCase()}.velocity.VelocityBootStrap",
"description" to project.description
))
}
from("src/main/resources") {
include("nukkit.yml")
expand(mapOf(
"id" to rootProject.name.toLowerCase(),
"name" to rootProject.name,
"version" to project.version,
"main" to "${rootProject.group}.${rootProject.name.toLowerCase()}.nukkit.NukkitBootStrap",
"description" to project.description
))
}
}