-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
109 lines (85 loc) · 2.75 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
plugins {
id("biz.aQute.bnd.builder") version "6.4.0"
id 'maven-publish'
id("net.researchgate.release") version "3.0.2"
}
group = 'com.dotcms'
configurations {
osgiLibs
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
repositories {
mavenCentral()
maven { url "https://repo.dotcms.com/artifactory/libs-release" }
}
dependencies {
implementation 'com.knuddels:jtokkit:0.6.1'
implementation 'com.dotcms:dotcms:23.10.24'
//implementation fileTree(include: ["*.jar"], dir: "/Users/will/git/dotcms/core/dotcms-war/target/dotcms-war-1.0.0-SNAPSHOT/WEB-INF/lib")
implementation (group: 'com.pgvector', name: 'pgvector', version: '0.1.3')
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
osgiLibs 'com.knuddels:jtokkit:0.6.1'
osgiLibs (group: 'com.pgvector', name: 'pgvector', version: '0.1.3') {
exclude group: 'org.postgresql', module: 'postgresql'
}
//osgiLibs 'com.github.jtidy:jtidy:1.0.5'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
credentials {
username = "$System.env.ARTIFACTORY_USER"
password = "$System.env.ARTIFACTORY_PASSWD"
}
println 'dotAI VERSION' + project.version
if(project.version.endsWith('-SNAPSHOT')) {
println 'PUBLISHING dotAI SNAPSHOT'
url "https://repo.dotcms.com/artifactory/libs-snapshot-local"
} else {
println 'PUBLISHING dotAI RELEASE'
url "https://repo.dotcms.com/artifactory/libs-release-local"
}
}
}
}
test {
useJUnitPlatform()
}
task cleanLibFiles(type: Delete) {
delete fileTree("src/main/resources/libs").matching {
include "**/*"
}
}
task copyToLib(type: Copy) {
from configurations.osgiLibs
into "src/main/resources/libs"
}
clean.dependsOn(cleanLibFiles)
processResources.dependsOn(copyToLib)
jar {
manifest {
attributes(
'Bundle-Vendor': 'dotCMS',
'Bundle-Description': 'dotCMS - AI, Embeddings and Vector Search',
'Bundle-DocURL': 'https://www.dotcms.com/',
'Bundle-Activator': 'com.dotcms.ai.Activator',
'Import-Package': '*;version=0',
'Bundle-ClassPath' : '.;libs/jtokkit-0.6.1.jar;libs/pgvector-0.1.3.jar;libs/netty-all-4.1.63.Final.jar',
'Require-Capability' : ""
)
}
bundle {
bnd(
"-noee": "true",
"-sources": "false",
"-contract": "!JavaServlet,*"
)
}
}