2015-04-13 07:25:48 +02:00
|
|
|
plugins {
|
2015-08-13 02:20:41 +02:00
|
|
|
id 'java'
|
|
|
|
id 'maven-publish'
|
|
|
|
id "com.jfrog.artifactory" version "3.1.1"
|
2015-04-13 07:25:48 +02:00
|
|
|
}
|
2015-03-10 01:28:41 +01:00
|
|
|
|
2015-03-31 11:39:34 +02:00
|
|
|
println 'Compiling LibsDisguises via Gradle ver. ' + gradle.gradleVersion
|
|
|
|
|
2015-03-10 19:58:05 +01:00
|
|
|
sourceCompatibility = '1.7'
|
2016-03-05 03:02:39 +01:00
|
|
|
ext.spigotVersion = '1.9-R0.1-SNAPSHOT'
|
2015-03-10 01:28:41 +01:00
|
|
|
|
2016-03-22 00:07:21 +01:00
|
|
|
ext.disguisesVersion = '9.0.2'
|
2015-07-01 22:02:57 +02:00
|
|
|
|
2015-03-10 01:28:41 +01:00
|
|
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
|
|
|
|
|
|
|
repositories {
|
2016-03-22 00:45:43 +01:00
|
|
|
mavenCentral()
|
|
|
|
|
|
|
|
maven {
|
|
|
|
name 'Spigot'
|
|
|
|
url 'https://hub.spigotmc.org/nexus/content/groups/public/'
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
|
|
|
url 'https://oss.sonatype.org/content/groups/public/'
|
|
|
|
}
|
|
|
|
|
2015-03-10 01:28:41 +01:00
|
|
|
maven {
|
2015-07-06 14:23:32 +02:00
|
|
|
name 'dmulloy2-repo'
|
|
|
|
url 'http://repo.dmulloy2.net/content/groups/public/'
|
2015-03-10 01:28:41 +01:00
|
|
|
}
|
2016-01-27 04:55:16 +01:00
|
|
|
|
|
|
|
flatDir {
|
|
|
|
dir 'libs'
|
|
|
|
}
|
2015-03-10 01:28:41 +01:00
|
|
|
}
|
|
|
|
|
2015-08-13 02:20:41 +02:00
|
|
|
task sourceJar(type: Jar, dependsOn: classes) {
|
2015-07-01 20:44:32 +02:00
|
|
|
classifier = 'sources'
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
}
|
|
|
|
|
2015-08-13 02:20:41 +02:00
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
2015-07-01 20:44:32 +02:00
|
|
|
classifier = 'javadoc'
|
|
|
|
from javadoc.destinationDir
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
baseName "LibsDisguises"
|
|
|
|
}
|
|
|
|
|
2016-03-22 00:07:21 +01:00
|
|
|
processResources {
|
|
|
|
expand projectVersion: disguisesVersion
|
|
|
|
}
|
|
|
|
|
2015-07-01 20:44:32 +02:00
|
|
|
artifacts {
|
|
|
|
archives sourceJar
|
|
|
|
archives javadocJar
|
|
|
|
archives jar
|
|
|
|
}
|
|
|
|
|
2015-07-01 20:29:40 +02:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
groupId 'LibsDisguises'
|
|
|
|
artifactId 'LibsDisguises'
|
2015-07-01 22:02:57 +02:00
|
|
|
version disguisesVersion + '-SNAPSHOT'
|
2015-07-01 20:29:40 +02:00
|
|
|
from components.java
|
2015-07-01 22:02:57 +02:00
|
|
|
artifact sourceJar {
|
2015-07-01 20:44:32 +02:00
|
|
|
classifier = 'sources'
|
|
|
|
}
|
2015-07-01 22:02:57 +02:00
|
|
|
artifact javadocJar {
|
2015-07-01 20:44:32 +02:00
|
|
|
classifier = 'javadoc'
|
|
|
|
}
|
2015-07-01 20:29:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-05 03:02:39 +01:00
|
|
|
|
2015-07-01 19:47:20 +02:00
|
|
|
artifactoryPublish.skip = false
|
|
|
|
|
2015-07-01 15:33:25 +02:00
|
|
|
artifactory {
|
|
|
|
contextUrl = 'http://localhost:8081/artifactory'
|
|
|
|
publish {
|
2015-08-13 02:20:41 +02:00
|
|
|
repository {
|
|
|
|
repoKey = 'libs-snapshot-local'
|
|
|
|
username = '${artifactory_user}'
|
|
|
|
password = '${artifactory_password}'
|
|
|
|
}
|
|
|
|
defaults {
|
|
|
|
publications('mavenJava')
|
|
|
|
}
|
2015-07-01 15:33:25 +02:00
|
|
|
}
|
2015-08-13 02:20:41 +02:00
|
|
|
resolve {
|
|
|
|
repoKey = 'repo'
|
2015-07-01 15:33:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-10 01:28:41 +01:00
|
|
|
file('libs').mkdirs()
|
|
|
|
|
2016-03-05 03:02:39 +01:00
|
|
|
ant.get src: 'http://server.o2gaming.com/downloads/spigot-1.9.jar', dest: file('libs'), verbose: false, skipexisting: true
|
2015-03-10 01:28:41 +01:00
|
|
|
|
|
|
|
dependencies {
|
2016-03-22 00:45:43 +01:00
|
|
|
compile "org.spigotmc:spigot-api:$project.ext.spigotVersion"
|
2016-03-10 06:44:11 +01:00
|
|
|
compile 'com.comphenix.protocol:ProtocolLib:3.7.0-SNAPSHOT'
|
2016-03-22 00:48:39 +01:00
|
|
|
compile group: "spigot", name: 'spigot-1.9', version: "1.9"
|
2015-03-10 01:28:41 +01:00
|
|
|
testCompile group: 'junit', name: 'junit', version: '4.10'
|
|
|
|
}
|