-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (93 loc) · 2.68 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
102
103
104
105
106
107
108
109
plugins {
id "com.github.hierynomus.license" version "0.14.0"
id 'org.spongepowered.plugin' version '0.8.1'
id 'com.github.johnrengelman.shadow' version '2.0.2'
id "com.jfrog.artifactory" version "4.4.15"
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
group 'net.reallifegames'
project.ext.baseName = 'glm'
version '1.0.0'
description = 'Minecraft WebGL Map.'
archivesBaseName = 'GlmSponge'
project.ext.rlgMavenUser = hasProperty('rlgMavenUser') ? rlgMavenUser : System.getenv('rlgMavenUser')
project.ext.rlgMavenPassword = hasProperty('rlgMavenPassword') ? rlgMavenPassword : System.getenv('rlgMavenPassword')
repositories {
mavenCentral()
maven {
url 'https://repo.spongepowered.org/maven/'
}
maven {
name = 'reallifegames'
url = 'https://reallifegames.net/artifactory/gradle-release-local'
}
}
configurations {
compile.extendsFrom shadow
}
dependencies {
compile 'org.spongepowered:spongeapi:7.0.0'
compile 'net.reallifegames:GlmCommon:1.0.6'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
compile 'org.java-websocket:Java-WebSocket:1.3.7'
shadow 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
shadow 'org.java-websocket:Java-WebSocket:1.3.7'
shadow 'net.reallifegames:GlmCommon:1.0.6'
}
license {
header project.file("LICENSE.txt")
strictCheck true
mapping {
java='SLASHSTAR_STYLE'
}
}
shadowJar {
baseName = project.ext.baseName
classifier = null
version = version
configurations = [project.configurations.shadow]
relocate 'com.fasterxml.jackson', 'net.reallifegames.mc.fasterxml'
}
shadowJar.dependsOn.add("build")
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifactory {
contextUrl = 'https://reallifegames.net/artifactory/'
publish {
repository {
repoKey = 'gradle-release-local'
username = "${rlgMavenUser}"
password = "${rlgMavenPassword}"
maven = true
}
defaults {
publications ('mavenJava')
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId "${group}"
artifactId "${archivesBaseName}"
version "${version}"
from components.java
artifact (sourcesJar) {
classifier "sources"
}
artifact (javadocJar) {
classifier "javadoc"
}
}
}
}