e41bb8753b
Still need to get automatic filtering fixed
75 Zeilen
2.3 KiB
Groovy
75 Zeilen
2.3 KiB
Groovy
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
plugins {
|
|
id 'com.github.johnrengelman.shadow' version '2.0.4'
|
|
id 'maven-publish'
|
|
id 'java'
|
|
}
|
|
|
|
group 'com.comphenix.protocol'
|
|
version '4.5.0-SNAPSHOT'
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
maven { url 'http://repo.dmulloy2.net/nexus/repository/public/' }
|
|
maven { url 'https://hub.spigotmc.org/nexus/content/groups/public/' }
|
|
}
|
|
|
|
dependencies {
|
|
compile group: 'com.github.jengelman.gradle.plugins', name: 'shadow', version: '2.0.4'
|
|
compile group: 'io.netty', name: 'netty-all', version: '4.0.23.Final'
|
|
compile group: 'org.spigotmc', name: 'spigot-api', version: '1.14-R0.1-SNAPSHOT'
|
|
compile group: 'org.spigotmc', name: 'spigot', version: '1.14-R0.1-SNAPSHOT'
|
|
compile group: 'cglib', name: 'cglib-nodep', version: '3.2.5'
|
|
compile group: 'com.comphenix.executors', name: 'BukkitExecutors', version: '1.1-SNAPSHOT'
|
|
testCompile group: 'junit', name: 'junit', version: '4.12'
|
|
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.21.0'
|
|
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: '1.7.4'
|
|
testCompile group: 'org.powermock', name: 'powermock-api-mockito2', version: '1.7.4'
|
|
}
|
|
|
|
shadowJar {
|
|
dependencies {
|
|
include(dependency('cglib:.*'))
|
|
include(dependency('com.comphenix.executors:.*'))
|
|
}
|
|
relocate 'net.sf.cglib', 'com.comphenix.net.sf.cglib'
|
|
archiveName = 'ProtocolLib.jar'
|
|
}
|
|
|
|
javadoc {
|
|
failOnError = false
|
|
}
|
|
|
|
processResources {
|
|
def fullVersion = version
|
|
if (System.getenv('BUILD_NUMBER')) {
|
|
fullVersion = version + '-' + System.getenv('BUILD_NUMBER')
|
|
}
|
|
|
|
with copySpec {
|
|
from 'src/main/resources'
|
|
filter(ReplaceTokens, tokens: ['$fullVersion': fullVersion])
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
afterEvaluate {
|
|
artifactId = 'ProtocolLib'
|
|
}
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
url = version.endsWith('SNAPSHOT') ? 'http://repo.dmulloy2.net/nexus/repository/snapshots/' :
|
|
'http://repo.dmulloy2.net/nexus/repository/releases/'
|
|
}
|
|
}
|
|
}
|