-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
65 lines (58 loc) · 1.37 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
apply plugin: 'java'
apply plugin: 'kotlin'
group = pluginGroup
version = pluginVersion
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
configurations {
embed
compile.extendsFrom(embed)
}
repositories {
mavenCentral()
maven {
name = 'papermc-repo'
url = 'https://papermc.io/repo/repository/maven-public/'
}
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/groups/public/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
}
dependencies {
compile "com.destroystokyo.paper:paper-api:$spigot_version"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
import org.apache.tools.ant.filters.ReplaceTokens
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
main.java.srcDirs += 'src/main/java'
}
processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version]
}
}
buildscript {
ext{
kotlin_version = '1.4.0'
spigot_version = '1.15.2-R0.1-SNAPSHOT'
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
jar {
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}