forked from unit-mesh/choco-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
127 lines (112 loc) · 3.83 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.jvm)
alias(libs.plugins.serialization)
id("java-library")
id("maven-publish")
publishing
signing
}
allprojects {
apply(plugin = "java")
apply(plugin = "kotlin")
apply(plugin = "jacoco")
group = "cc.unitmesh"
version = "1.0.1"
repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://repo.spring.io/snapshot")
name = "Spring Snapshots"
}
maven(url = uri("https://packages.jetbrains.team/maven/p/ktls/maven"))
}
java {
sourceCompatibility = JavaVersion.VERSION_11
}
kotlin {
jvmToolchain(11)
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
jvmTarget = "11"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
}
configure(
allprojects
- project(":server")
- project(":rag-modules")
- project(":llm-modules")
- project(":dsl")
) {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "signing")
apply(plugin = "publishing")
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set("ChocolateFactory")
description.set("ChocoBuilder is a cutting-edge LLM toolkit designed to empower you in creating your very own AI assistant.")
url.set("https://framework.unitmesh.cc/")
licenses {
license {
name.set("MPL-2.0")
url.set("https://github.com/unit-mesh/chocolate-factory/raw/master/LICENSE")
}
}
developers {
developer {
id.set("UnitMesh")
name.set("UnitMesh Team")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/unit-mesh/chocolate-factory.git")
developerConnection.set("scm:git:ssh://github.com/unit-mesh/chocolate-factory.git")
url.set("https://github.com/unit-mesh/chocolate-factory/")
}
}
}
}
repositories {
maven {
val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username =
(if (project.findProperty("sonatypeUsername") != null) project.findProperty("sonatypeUsername")
else System.getenv("MAVEN_USERNAME")).toString()
password =
(if (project.findProperty("sonatypePassword") != null) project.findProperty("sonatypePassword")
else System.getenv("MAVEN_PASSWORD")).toString()
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}
java {
withJavadocJar()
withSourcesJar()
}
}