forked from mayabot/fastText4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
143 lines (113 loc) · 3.61 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
140
141
142
143
plugins {
id "org.jetbrains.kotlin.jvm" version "1.2.70"
id 'java'
id 'maven-publish'
id 'signing'
}
description = 'FastText的java版本实现,兼容facebook发布的原生预训练模型。'
version = "1.2.3"
//.BUILD-SNAPSHOT
group = "com.mayabot"
repositories {
mavenCentral()
}
sourceSets {
example {
compileClasspath += sourceSets.main.runtimeClasspath
runtimeClasspath += sourceSets.main.runtimeClasspath
}
main.kotlin.srcDirs = main.java.srcDirs
test.kotlin.srcDirs = test.java.srcDirs
example.kotlin.srcDirs = example.java.srcDirs
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile group: 'com.carrotsearch', name: 'hppc', version: '0.7.3'
compile 'com.mayabot:maya-simple-blas:1.1.2'
compile group: 'com.google.guava', name: 'guava', version: "19.0"
testCompile 'junit:junit:4.12'
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.encoding = "UTF-8"
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs += ["-Xdoclint:none", "-Xlint:none", "-nowarn"]
}
publishing {
publications {
java(MavenPublication) {
from components.java
artifact sourceJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
pom {
name = 'fastText4j'
description = 'Java(kotlin) implementation of the Fasebook \'s FastText'
url = 'https://github.com/mayabot/fastText4j'
licenses {
license {
name = 'BSD 3-Clause License'
url = 'https://github.com/facebookresearch/fastText/blob/master/LICENSE'
}
}
developers {
developer {
id = 'jimichan'
name = 'Jimi chan'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:[email protected]:mayabot/fastText4j.git'
developerConnection = 'scm:git:[email protected]:mayabot/fastText4j.git'
url = '[email protected]:mayabot/fastText4j.git'
}
}
}
}
repositories {
if(project.hasProperty("oss_user")){
maven {
name 'OssPublic'
if (project.version.endsWith('-SNAPSHOT')) {
url "https://oss.sonatype.org/content/repositories/snapshots/"
} else {
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
credentials{
username "${oss_user}"
password "${oss_password}"
}
}
}
if(project.hasProperty("maya_pri_user")){
maven {
name 'MayaPrivate'
if (project.version.endsWith('-SNAPSHOT')) {
url "${maya_pri_snapshot}"
} else {
url = "${maya_pri_release}"
}
credentials{
username "${maya_pri_user}"
password "${maya_pri_pass}"
}
}
}
}
}
signing {
sign publishing.publications.java
}