Some checks failed
build / build (push) Has been cancelled
- Updated `OllamaObject` to support tool registration with sources. - Improved error handling and debug logging in multiple classes. - Added Maven plugin and publication setup in `build.gradle`. - Updated version to `1.3`. Signed-off-by: Zacharias <zacharias@4zellen.se>
77 lines
2.0 KiB
Groovy
77 lines
2.0 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'com.gradleup.shadow' version '9.0.0-beta7'
|
|
}
|
|
|
|
group = 'me.zacharias'
|
|
version = '1.0-SNAPSHOT'
|
|
|
|
allprojects {
|
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'java'
|
|
apply plugin: 'com.gradleup.shadow'
|
|
|
|
dependencies {
|
|
implementation("org.json:json:20250107")
|
|
implementation("com.github.docker-java:docker-java:3.4.1")
|
|
implementation("org.jetbrains:annotations:23.1.0")
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
archiveClassifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
archiveClassifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
// Make Javadoc generation non-fatal to avoid publish failures on bad Javadoc
|
|
tasks.withType(Javadoc).configureEach {
|
|
options.addBooleanOption('Xdoclint:none', true)
|
|
failOnError = false
|
|
}
|
|
|
|
// Configure local Maven publishing for modules that have a Java component
|
|
afterEvaluate { proj ->
|
|
if (components.findByName("java") != null) {
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
if (tasks.findByName('sourcesJar')) artifact tasks.sourcesJar
|
|
if (tasks.findByName('javadocJar')) artifact tasks.javadocJar
|
|
pom {
|
|
name = proj.name
|
|
description = "${proj.name} module of AI-test"
|
|
}
|
|
}
|
|
}
|
|
repositories {
|
|
mavenLocal()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |