-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
147 lines (124 loc) · 4.46 KB
/
build.gradle.kts
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
144
145
146
147
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.dokka.gradle.DokkaTask
plugins {
`maven-publish`
signing
kotlin("jvm") version "1.7.10"
kotlin("plugin.serialization") version "1.7.10"
id("org.jetbrains.dokka") version "1.7.10"
}
group = "com.londogard"
version = "1.2.0"
repositories {
mavenCentral()
jcenter()
maven("https://jitpack.io")
}
val kluentVersion: String by project
dependencies {
implementation("com.github.rholder:snowball-stemmer:1.3.0.581.1")
implementation("org.apache.commons:commons-compress:1.21")
implementation("org.jetbrains.kotlinx:dataframe:0.9.0-dev-1096")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0")
// EJML
implementation("org.ejml:ejml-simple:0.41")
implementation("org.ejml:ejml-kotlin:0.41")
// Multik
implementation("org.jetbrains.kotlinx:multik-core:0.2.0")
implementation("org.jetbrains.kotlinx:multik-default:0.2.0")
// DJL
implementation("ai.djl.sentencepiece:sentencepiece:0.18.0")
api("ai.djl.pytorch:pytorch-engine:0.18.0")
api("ai.djl.onnxruntime:onnxruntime-engine:0.18.0")
implementation("ai.djl.huggingface:tokenizers:0.18.0")
implementation("com.github.ben-manes.caffeine:caffeine:3.1.1")
// Logging
implementation("org.slf4j:slf4j-simple:2.0.0")
implementation("io.github.microutils:kotlin-logging-jvm:2.1.23")
// Standard Library
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
// Testing
testImplementation("org.amshove.kluent:kluent:$kluentVersion")
testImplementation("org.jetbrains.kotlin:kotlin-test:1.7.10")
testImplementation(kotlin("test-junit"))
// Docs
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.7.10")
}
tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets {
named("main") {
includes.from("docs/docs.md")
// samples.from("<insert-path>")
}
}
}
tasks.test {
useJUnit()
}
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(11)) // "8"
}
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "11"
}
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs = listOf("-Xmx2g")
}
java {
withJavadocJar()
withSourcesJar()
}
signing {
val key = System.getenv("SIGNING_KEY")
val password = System.getenv("SIGNING_PASSWORD")
val publishing: PublishingExtension by project
useInMemoryPgpKeys(key, password)
sign(publishing.publications)
}
publishing {
repositories {
maven {
name = "OSSRH"
val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = System.getenv("OSSRH_USER")
password = System.getenv("OSSRH_PASSWORD")
}
}
mavenLocal()
}
publications {
val main by creating(MavenPublication::class) {
from(components["java"])
pom {
name.set("londogard-nlp-toolkit")
description.set("londogard-nlp-toolkit is a library that provides utilities when working with natural language processing such as word/subword/sentence embeddings, word-frequencies, stopwords, stemming, and much more.")
url.set("https://github.com/londogard/londogard-nlp-toolkit/")
licenses {
license {
name.set("GPL-3.0 License")
url.set("https://github.com/londogard/londogard-nlp-toolkit/blob/main/LICENSE")
}
}
developers {
developer {
id.set("londogard")
name.set("Hampus Londögård")
email.set("hampus.londogard@gmail.com")
}
}
scm {
connection.set("scm:git:git@github.com:londogard/londogard-nlp-toolkit.git")
developerConnection.set("scm:git:git@github.com:londogard/londogard-nlp-toolkit.git")
url.set("https://github.com/londogard/londogard-nlp-toolkit/")
}
}
}
}
}