-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
61 lines (53 loc) · 1.31 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
plugins {
id "java"
id "maven-publish"
}
group "com.terraforged"
version "0.9.0-SNAPSHOT"
configurations {
shade
compile.extendsFrom(shade)
all {
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
}
}
repositories {
mavenCentral()
maven { url "https://io.terraforged.com/maven/" }
}
dependencies {
testCompile "junit:junit:4.13.2"
shade "com.terraforged:Cereal:0.0.5-SNAPSHOT"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}
jar {
from { configurations.shade.collect { it.isDirectory() ? it : zipTree(it) } }
duplicatesStrategy = "EXCLUDE"
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
artifact sourcesJar
}
}
if (System.getenv("MAVEN_USER") != null && System.getenv("MAVEN_PASS") != null) {
repositories {
maven {
credentials {
username System.getenv("MAVEN_USER")
password System.getenv("MAVEN_PASS")
}
name = "nexus"
url = "https://io.terraforged.com/maven/"
}
}
}
}