LibsDisguises/build.gradle

109 lines
2.3 KiB
Groovy
Raw Normal View History

2015-07-01 15:17:50 +02:00
import java.nio.file.*
import java.nio.file.Path
plugins {
id 'java'
2015-07-01 20:29:40 +02:00
id 'maven-publish'
id "com.jfrog.artifactory" version "3.1.1"
}
println 'Compiling LibsDisguises via Gradle ver. ' + gradle.gradleVersion
2015-03-10 19:58:05 +01:00
sourceCompatibility = '1.7'
2015-06-13 15:24:10 +02:00
ext.spigotVersion = '1.8.7-R0.1-SNAPSHOT'
2015-07-15 14:27:45 +02:00
ext.disguisesVersion = '8.6.1'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
mavenCentral()
maven {
name 'Spigot'
url 'https://hub.spigotmc.org/nexus/content/groups/public/'
}
maven {
name 'Vault-Repo'
url 'http://nexus.theyeticave.net/content/repositories/pub_releases'
}
maven {
name 'dmulloy2-repo'
url 'http://repo.dmulloy2.net/content/groups/public/'
}
}
task sourceJar (type : Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar (type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
jar {
baseName "LibsDisguises"
}
artifacts {
archives sourceJar
archives javadocJar
archives jar
}
2015-07-01 20:29:40 +02:00
publishing {
publications {
mavenJava(MavenPublication) {
groupId 'LibsDisguises'
artifactId 'LibsDisguises'
version disguisesVersion + '-SNAPSHOT'
2015-07-01 20:29:40 +02:00
from components.java
artifact sourceJar {
classifier = 'sources'
}
artifact javadocJar {
classifier = 'javadoc'
}
2015-07-01 20:29:40 +02:00
}
}
}
artifactoryPublish.skip = false
artifactory {
contextUrl = 'http://localhost:8081/artifactory'
publish {
repository {
repoKey = 'libs-snapshot-local'
username = '${artifactory_user}'
password = '${artifactory_password}'
}
2015-07-01 20:29:40 +02:00
defaults {
publications('mavenJava')
}
}
resolve {
repoKey = 'repo'
}
}
file('libs').mkdirs()
2015-05-30 09:22:38 +02:00
//Retrieves spigot.jar server file from link
ant.get src: 'https://www.dropbox.com/s/1ofgubrldjwamnk/spigot.jar?dl=1', dest: file('libs'), verbose: false, skipexisting: true
dependencies {
2015-05-30 09:22:38 +02:00
compile 'org.bukkit:bukkit:' + project.ext.spigotVersion
compile 'com.comphenix.protocol:ProtocolLib:3.6.4-SNAPSHOT'
compile files(
'libs/spigot.jar'
)
testCompile group: 'junit', name: 'junit', version: '4.10'
}