forked from jb-aero/CommandHelper-Sponge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
55 lines (48 loc) · 1.61 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
group 'org.enginehub'
version '0.1.0-SNAPSHOT'
description 'CommandHelper is a full blown scripting language built right into Minecraft'
String URL = 'http://wiki.sk89q.com/wiki/CommandHelper'
String ARTIFACT_ID = 'commandhelper'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven { url "http://mvn2.sk89q.com/repo" }
maven { url "http://repo.spongepowered.org/maven" }
maven { url "http://repo.mcstats.org/content/repositories/public" }
}
configurations {
// configuration that holds jars to include in the jar
jarBuildWith
}
dependencies {
jarBuildWith('com.sk89q:commandhelper:3.3.2-SNAPSHOT') {
exclude group: 'org.spigotmc'
exclude group: 'org.mcstats'
}
compile('com.sk89q:commandhelper:3.3.2-SNAPSHOT') {
exclude group: 'org.spigotmc'
exclude group: 'org.mcstats'
}
compile 'org.spongepowered:spongeapi:5.2.0-SNAPSHOT'
}
compileJava.doFirst {
def file = new File("$projectDir/src/main/java/com/laytonsmith/commandhelper/PomData.java")
file.createNewFile()
file.text = """package com.laytonsmith.commandhelper;
public class PomData {
\tpublic static final String GROUP = "$project.group";
\tpublic static final String ARTIFACT_ID = "$ARTIFACT_ID";
\tpublic static final String NAME = "$project.name";
\tpublic static final String VERSION = "$version";
\tpublic static final String DESCRIPTION = "$project.description";
\tpublic static final String WEBSITE = "$URL";
}
"""
}
jar {
dependsOn configurations.runtime
from {
configurations.jarBuildWith.collect {it.isDirectory()? it: zipTree(it)}
}
}