forked from li2109/langtorch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
155 lines (142 loc) · 5.06 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
144
145
146
147
148
149
150
151
152
153
154
155
plugins {
id 'java'
id 'maven-publish'
id 'signing'
id "org.sonarqube" version "3.5.0.2730"
}
group 'ai.knowly'
version '0.0.17'
sonarqube {
properties {
property "sonar.projectKey", "Knowly-ai_langtorch"
property "sonar.organization", "knowly-ai"
property "sonar.host.url", "https://sonarcloud.io"
}
}
ext {
gpgKey = project.hasProperty('gpgKey') ? project.getProperty('gpgKey') : System.getenv('GPG_PRIVATE_KEY')
gpgPassphrase = project.hasProperty('gpgPassphrase') ? project.getProperty('gpgPassphrase') : System.getenv('GPG_PASSPHRASE')
}
repositories {
mavenCentral()
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
classifier 'javadoc'
from javadoc.destinationDir
}
tasks.withType(Javadoc).configureEach {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'LangTorch'
description = 'Building composable LLM applications with Java.'
url = 'https://github.com/Knowly-ai/langtorch'
licenses {
license {
name = 'Apache License 2.0'
url = 'https://github.com/Knowly-ai/langtorch/blob/master/LICENSE.md'
}
}
developers {
developer {
id = 'langtorch-ops'
name = 'Langtorch Ops'
email = 'admin@knowly.ai'
}
}
scm {
connection = 'scm:git:git://github.com/Knowly-ai/langtorch.git'
developerConnection = 'scm:git:ssh://github.com/Knowly-ai/langtorch.git'
url = 'https://github.com/Knowly-ai/langtorch'
}
}
}
}
repositories {
maven {
url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv('OSSRH_USERNAME')
password = System.getenv('OSSRH_PASSWORD')
}
}
}
}
signing {
useInMemoryPgpKeys(gpgKey, gpgPassphrase)
sign publishing.publications.mavenJava
}
dependencies {
// Lombok dependency and requires annotationProcessor
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'
// Logging
implementation 'com.google.flogger:flogger:0.7.4'
implementation 'com.google.flogger:flogger-system-backend:0.7.4'
// Serialization
implementation 'com.google.code.gson:gson:2.10.1'
// Regex expression matching
implementation 'com.google.re2j:re2j:1.7'
// Java Utils
implementation "com.google.guava:guava:31.1-jre"
implementation 'commons-io:commons-io:2.11.0'
implementation 'com.google.mug:mug:6.6'
implementation 'com.google.auto.value:auto-value-annotations:1.10.1'
annotationProcessor 'com.google.auto.value:auto-value:1.10.1'
// Injection framework
implementation 'com.google.inject:guice:5.1.0'
// Environment variables
implementation 'io.github.cdimascio:java-dotenv:5.2.2'
// Retrofit
implementation 'com.squareup.retrofit2:adapter-guava:2.9.0'
implementation 'com.squareup.retrofit2:converter-jackson:2.9.0'
testImplementation 'com.squareup.retrofit2:retrofit-mock:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11'
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
// Reading PDF
implementation 'org.apache.pdfbox:pdfbox:2.0.28'
// Reading CSV
implementation 'org.apache.commons:commons-csv:1.10.0'
// PGVector
implementation "com.pgvector:pgvector:0.1.2"
// Apache commons lang
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.commons:commons-collections4:4.4'
// Tiktoken java implementation: https://github.com/openai/tiktoken
implementation 'com.knuddels:jtokkit:0.5.0'
}
// Testing related dependencies
dependencies {
// Mocking
testImplementation 'org.mockito:mockito-core:5.2.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.2.0'
// Generic testing
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
testImplementation 'com.google.truth:truth:1.1.3'
// Assertion
testImplementation 'com.google.truth:truth:1.1.3'
// Yaml
implementation 'org.yaml:snakeyaml:2.0'
// H2 in-memory database
testImplementation 'com.h2database:h2:2.1.214'
// Guice dependency injection testing utilities
testImplementation 'com.google.inject.extensions:guice-testlib:5.1.0'
}
test {
useJUnitPlatform()
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11