-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.gradle
101 lines (83 loc) · 2.16 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
96
97
98
99
100
101
plugins {
id 'java'
id 'maven-publish'
id "com.jfrog.artifactory" version "3.1.1"
}
sourceCompatibility = JavaVersion.VERSION_1_7
ext.spigotVersion = '1.8.8-R0.1-SNAPSHOT'
ext.carbonVersion = '2.0'
println 'Compiling Carbon 2 via Gradle ver. ' + gradle.gradleVersion
println 'Compiling for Java source version: ' + sourceCompatibility
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
task wrapper(type: Wrapper) {
gradleVersion = '2.1'
}
repositories {
mavenCentral()
maven {
name 'Sonatype'
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
name 'Spigot Snapshots'
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name 'Spigot'
url 'https://hub.spigotmc.org/nexus/content/groups/public/'
}
maven {
name 'dmulloy2-repo'
url 'http://repo.dmulloy2.net/content/groups/public/'
}
}
if (!hasProperty('mainClass')) {
ext.mainClass = ''
}
task sourceJar (type : Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
jar {
baseName "Carbon2"
}
artifacts {
archives sourceJar
archives jar
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId 'com.lastabyss'
artifactId 'Carbon2'
version carbonVersion + '-SNAPSHOT'
from components.java
artifact sourceJar {
classifier = 'sources'
}
}
}
}
artifactoryPublish.skip = false
artifactory {
contextUrl = 'http://localhost:8081/artifactory'
publish {
repository {
repoKey = 'libs-snapshot-local'
username = '${artifactory_user}'
password = '${artifactory_password}'
}
defaults {
publications('mavenJava')
}
}
resolve {
repoKey = 'repo'
}
}
file('libs').mkdirs()
ant.get src: 'https://dl.dropboxusercontent.com/u/71299154/Carbon2/spigot.jar', dest: file('libs'), verbose: false, skipexisting: true
dependencies {
compile files('libs/spigot.jar')
compile "org.spigotmc:spigot-api:$project.ext.spigotVersion"
}