This repository was archived by the owner on Apr 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
70 lines (60 loc) · 1.72 KB
/
build.gradle
File metadata and controls
70 lines (60 loc) · 1.72 KB
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
plugins {
id 'java'
id 'maven-publish'
id 'java-library'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = 'sandboxapi'
version = project.api_version + "+" + (System.getenv("TRAVIS_BUILD_NUMBER") ? ("build." + System.getenv("TRAVIS_BUILD_NUMBER")) : "invalid")
group = project.maven_group
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
configurations {
shade
compile.extendsFrom shade
}
dependencies {
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
shade 'com.electronwill.night-config:core:3.6.0'
shade 'com.electronwill.night-config:toml:3.6.0'
shade 'com.github.zafarkhaja:java-semver:0.9.0'
implementation group: 'com.google.guava', name: 'guava', version: '21.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
}
jar {
from {
configurations.shade.collect { it.isDirectory() ? it : zipTree(it) }
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
artifact sourcesJar
}
}
repositories {
if (System.getenv("mvn_username")) {
maven {
name = "Maven"
url = uri("sftp://maven.sandboxpowered.org:22/sbxmvn/")
credentials {
username = System.getenv("mvn_username")
password = System.getenv("mvn_password")
}
}
} else {
mavenLocal()
}
}
}