forked from seek-oss/lightgbm4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
139 lines (117 loc) · 3.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
plugins {
id 'com.adtran.scala-multiversion-plugin' version '2.0.4'
id 'com.github.maiflai.scalatest' version '0.30'
}
apply plugin: 'scala'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'signing'
group = 'com.github.seek-oss'
version = "${lightGbmVersion}-${lightGbm4JSubVersion}"
repositories {
mavenLocal()
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile(
"org.scala-lang:scala-library:%scala-version%",
"com.typesafe.scala-logging:scala-logging_%%:3.9.4",
'commons-io:commons-io:2.11.0',
'commons-lang:commons-lang:2.6',
"com.microsoft.ml.lightgbm:lightgbmlib:${lightGbmVersion}${lightGbmJavaSubVersion}"
)
testCompile(
'junit:junit:4.13.2',
"org.scalatest:scalatest_%%:3.0.5"
)
testRuntime(
'org.slf4j:slf4j-simple:2.0.3',
'org.pegdown:pegdown:1.6.0'
)
}
task javadocJar(type: Jar) {
from javadoc
classifier 'javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allScala
classifier 'sources'
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: nexusSeekOssUsername, password: project.nexusSeekOssPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: project.nexusSeekOssUsername, password: project.nexusSeekOssPassword)
}
pom.project {
name = 'LightGBM4J'
packaging 'jar'
description = 'A JVM interface for LightGBM, written in Scala, for inference in production.'
url = 'https://github.com/seek-oss/lightgbm4j'
scm {
connection = 'scm:git:https://github.com/seek-oss/lightgbm4j.git'
developerConnection = 'scm:git:https://github.com/seek-oss/lightgbm4j.git'
url = 'https://github.com/seek-oss/lightgbm4j'
}
developers {
developer {
name 'Oliver Hutchison'
email '[email protected]'
organization 'SEEK Limited'
}
developer {
name 'Oliver Mannion'
}
}
licenses {
license {
name = 'MIT License'
url = 'https://github.com/seek-oss/lightgbm4j/blob/master/LICENSE'
}
}
}
}
}
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.additionalParameters = [
"-Xfatal-warnings",
"-Ywarn-unused-import",
"-Ywarn-dead-code",
"-Yno-adapted-args",
"-Ypartial-unification",
"-deprecation",
"-unchecked",
"-feature",
"-Xlint",
"-Xfuture",
"-language:postfixOps",
"-language:implicitConversions",
"-language:higherKinds"
]
}
tasks.withType(ScalaCompile) {
configure(scalaCompileOptions.forkOptions) {
memoryMaximumSize = '1g'
jvmArgs = ['-Xss16m']
}
}
task checkVersion {
doLast {
if (!version.matches('[0-9]+\\.[0-9]+\\.[0-9]+(-SNAPSHOT)?'))
throw new GradleException("Invalid version '$version'")
}
}
build.mustRunAfter(checkVersion)