-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
82 lines (65 loc) · 2.08 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
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
ext.kotlin_version = '1.1.3-2'
repositories {
mavenCentral()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.3'
}
apply plugin: 'kotlin'
group = 'gg.obsidian'
version = '2.0.0'
description = """Use Discourse group as a whitelist"""
ext.url = 'https://github.com/the-obsidian/DiscourseBridge'
repositories {
maven { url 'https://maven-central.storage.googleapis.com' }
maven { url 'https://hub.spigotmc.org/nexus/content/groups/public/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'http://lutece.paris.fr/nexus/content/repositories/lutece_third_party' }
maven { url 'https://github.com/DV8FromTheWorld/Maven-Repository/raw/master/repo' }
jcenter()
}
dependencies {
compile group: 'org.spigotmc', name: 'spigot-api', version:'1.12-R0.1-SNAPSHOT'
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version:'1.1.3-2'
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.2.0'
}
compileKotlin {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
kotlinOptions {
jvmTarget = "1.8"
}
}
processResources {
filter ReplaceTokens, tokens: [
'DESCRIPTION': project.property('description'),
'URL': project.property('url'),
'VERSION': project.property('version')
]
}
build.finalizedBy(shadowJar)
shadowJar {
classifier 'dist'
dependencies {
exclude(dependency('org.spigotmc:.*:.*'))
}
exclude '.cache'
}
task copyFinalJar(type: Copy) {
from "build/libs/${shadowJar.archiveName}"
into "build"
rename(
shadowJar.archiveName,
"${project.property('name')}-${project.property('version')}.jar"
)
}
shadowJar.finalizedBy(copyFinalJar)