forked from TriggerReactor/TriggerReactor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.bak
144 lines (119 loc) · 3.34 KB
/
build.gradle.bak
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
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.DumperOptions;
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.yaml:snakeyaml:1.8'
}
}
plugins {
id 'java'
id 'org.spongepowered.plugin' version '0.8.1'
id 'groovy'
}
ext{
version = '2.1.8'
}
group = 'io.github.wysohn.triggerreactor'
description = 'Simple script parser with infinite possibility'
sponge {
plugin {
meta {
version = project.ext.version
description = 'Simple script parser with infinite possibility'
}
}
}
task setupPluginYml{
DumperOptions options = new DumperOptions();
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
options.setPrettyFlow(true);
File file = new File("$projectDir/src/main/resources/plugin.yml");
InputStream input = new FileInputStream(file);
Yaml yaml = new Yaml(options);
Map<String, Object> map = yaml.load(input);
input.close();
map.put("version", project.ext.version);
FileWriter writer = new FileWriter(file);
yaml.dump(map, writer)
writer.close();
}
repositories {
jcenter()
mavenCentral()
maven {
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
//maven {
// url "http://nexus.hc.to/content/repositories/pub_releases/"
//}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
maven {
name = 'CodeMC'
url = 'https://repo.codemc.org/repository/maven-public'
}
}
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/resources']
include '**/*.js'
include '**/*.yml'
}
}
test{
java {
srcDirs = ['src/test/java/']
}
}
}
dependencies {
compile fileTree(dir: "libs", includes: ['*.jar'])
//bukkit
compile 'org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT'
//compile "net.milkbowl.vault:VaultAPI:1.6"
compile "org.bstats:bstats-bukkit-lite:1.4"
//////////////////////////////////////////////////////////
//sponge
compile 'org.spongepowered:spongeapi:7.+'
compile "org.bstats:bstats-sponge-lite:1.4"
//////////////////////////////////////////////////////////
// https://mvnrepository.com/artifact/mysql/mysql-connector-java
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.13'
testCompile 'junit:junit:4.+'
testCompile 'org.mockito:mockito-core:2.+'
testCompile 'eu.codearte.catch-exception:catch-exception:1.+'
testCompile 'org.assertj:assertj-core:1.+'
}
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
failOnError = false
options {
links "https://docs.oracle.com/javase/8/docs/api/"
links "https://hub.spigotmc.org/javadocs/bukkit/"
links "https://jd.spongepowered.org/7.0.0/"
}
}
jar {
from {
String[] include = [
"bstats-bukkit-lite-1.4.jar",
"bstats-sponge-lite-1.4.jar",
]
configurations.compile
.findAll { include.contains(it.name) }
.collect { it.isDirectory() ? it : zipTree(it) }
}
}