forked from komiya-atsushi/xgboost-predictor-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
105 lines (86 loc) · 2.69 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'net.researchgate:gradle-release:2.3.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
}
}
subprojects {
repositories {
jcenter()
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'net.researchgate.release'
apply plugin: 'com.jfrog.bintray'
group 'biz.k11i'
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
javadoc {
options.locale = 'en_US'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
release {
preTagCommitMessage = '[skip ci] [Gradle Release Plugin] - pre tag commit: '
newVersionCommitMessage = '[skip ci] [Gradle Release Plugin] - new version commit: '
tagTemplate = '$name-$version'
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? bintrayUser : ''
key = project.hasProperty('bintrayKey') ? bintrayKey : ''
publications = ['maven']
pkg {
repo = 'maven'
name = project.name
desc = project.description
userOrg = 'komiya-atsushi'
licenses = ['Apache-2.0']
websiteUrl = 'https://github.com/komiya-atsushi/xgboost-predictor-java'
issueTrackerUrl = 'https://github.com/komiya-atsushi/xgboost-predictor-java/issues'
vcsUrl = 'https://github.com/komiya-atsushi/xgboost-predictor-java.git'
version {
name = project.version
}
}
}
createReleaseTag.dependsOn bintrayUpload
task checkJavaVersion << {
if (!JavaVersion.current().isJava7()) {
String message = "ERROR: Java 7 required but " +
JavaVersion.current() +
" found. Change your JAVA_HOME environment variable."
throw new IllegalStateException(message)
}
}
compileJava.dependsOn checkJavaVersion
}