-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
78 lines (63 loc) · 1.76 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
}
}
plugins {
id 'java'
id 'maven-publish'
id 'com.palantir.git-version' version '0.12.2'
}
// This is weird, but I can't seem to get at the plugin the other way
apply plugin: 'com.jfrog.bintray'
group 'info.journeymap'
if (project.hasProperty("production")) {
version release
} else {
def details = versionDetails()
version "${release}-${details.gitHash}"
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
def bintrayUser = project.findProperty("bintray.user") ?: System.getenv("BINTRAY_USER")
def bintrayKey = project.findProperty("bintray.password") ?: System.getenv("BINTRAY_PASSWORD")
if (project.hasProperty("production")) {
// Bintray is _only_ for releases, not snapshots
bintray {
user = bintrayUser
key = bintrayKey
pkg {
name = "journeymap-lang"
repo = "JourneyMap"
userOrg = "teamjm"
publications = ["maven"]
version {
name = project.release
released = new Date()
}
}
}
}
publishing {
repositories {
maven {
name = "JourneyMap"
url = uri("https://jm.gserv.me/repository/maven-snapshots/")
credentials {
username = project.findProperty("journeymap.user") ?: System.getenv("JOURNEYMAP_USER")
password = project.findProperty("journeymap.password") ?: System.getenv("JOURNEYMAP_PASSWORD")
}
version = project.release
}
}
publications {
maven(MavenPublication) {
from(components.java)
}
}
}