-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.gradle
More file actions
89 lines (73 loc) · 2.08 KB
/
build.gradle
File metadata and controls
89 lines (73 loc) · 2.08 KB
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
plugins {
id 'java'
alias libs.plugins.shadowJar
id 'maven-publish'
}
group = 'org.brain4j'
version = '3.0.0-SNAPSHOT'
subprojects {
version = rootProject.version
group = rootProject.group
apply plugin: 'java'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
maven {
name "brain4jReleases"
url "https://repo.brain4j.org/releases"
}
}
publishing {
repositories {
maven {
name = "brain4j"
def releasesRepo = uri("https://repo.brain4j.org/releases")
def snapshotsRepo = uri("https://repo.brain4j.org/snapshots")
url = version.endsWith("SNAPSHOT") ? snapshotsRepo : releasesRepo
credentials {
username = findProperty("BRAIN4J_USERNAME")
password = findProperty("BRAIN4J_TOKEN")
}
authentication {
basic(BasicAuthentication)
}
}
}
publications {
gpr(MavenPublication) {
from components.java
groupId = project.group
artifactId = project.name
version = project.version
}
}
}
compileJava {
options.encoding = "UTF-8"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
}
tasks.register('buildAll') {
dependsOn ':brain4j-datasets:shadowJar',
':brain4j-math:shadowJar',
':brain4j-core:shadowJar',
':brain4j-llm:shadowJar'
doLast {
println 'Completed build for all modules.'
}
}
tasks.register('publishAll') {
dependsOn ':brain4j-datasets:publish',
':brain4j-math:publish',
':brain4j-core:publish',
':brain4j-llm:publish'
doLast {
println 'Published all modules to the main repository.'
}
}