This repository has been archived by the owner on Aug 25, 2022. It is now read-only.
forked from PaperModLoader/Paper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
95 lines (86 loc) · 2.17 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
83
84
85
86
87
88
89
90
91
92
93
94
95
buildscript {
repositories {
mavenCentral()
maven {
name = "ilexiconn"
url = "http://maven.ilexiconn.net"
}
}
dependencies {
classpath "xyz.papermodloader:tree:0.1.0.+"
}
}
plugins {
id "java"
id "maven-publish"
}
apply plugin: "xyz.papermodloader.tree.paper"
group = "xyz.papermodloader"
version = getVersion()
archivesBaseName = "paper"
sourceCompatibility = targetCompatibility = "1.8"
if (System.getenv().BUILD_NUMBER) {
version = version + "." + "${System.getenv().BUILD_NUMBER}"
}
repositories {
mavenCentral()
maven {
name = "sponge"
url = "http://repo.spongepowered.org/maven"
}
maven {
name = "ilexiconn"
url = "http://maven.ilexiconn.net"
}
}
dependencies {
compile("org.spongepowered:mixin:0.5.11-SNAPSHOT") {
exclude module: "launchwrapper"
exclude module: "guava"
}
compile "xyz.papermodloader:book:0.1.0.17"
}
paper {
minecraft = "1.10.2"
mappings = 31
}
String getVersion() {
String version = "0.0.0"
String prefix = "public static final Version VERSION = new Version(\"";
File file = file("src/main/java/xyz/papermodloader/paper/Paper.java")
file.eachLine { String s ->
s = s.trim();
if (s.startsWith(prefix)) {
s = s.substring(prefix.length(), s.length() - 3);
version = s;
}
}
return version + "-1.10.2";
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId "xyz.papermodloader"
artifactId "paper"
from components.java
}
}
repositories {
maven {
credentials {
if (System.getenv().PASSWORD) {
username System.getenv().USERNAME
password System.getenv().PASSWORD
} else {
username ""
password ""
}
}
if (System.getenv().PASSWORD) {
url "sftp://connect.ilexiconn.net:22/home/ilexiconn/maven/"
} else {
url "file:///var/www/maven/"
}
}
}
}