Skip to content

Commit

Permalink
Cottontail DB core should now also be published as dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralph Gasser committed Apr 24, 2024
1 parent 55a3310 commit 10f74e0
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions cottontaildb-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,88 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

apply plugin: 'maven-publish'
apply plugin: 'signing'

repositories {
mavenCentral()
maven { url "https://kotlin.bintray.com/kotlinx" }
}

/** Source & target compatibility is Java 11. */
sourceCompatibility = 11
targetCompatibility = 11

compileKotlin {
compilerOptions.jvmTarget = JvmTarget.JVM_11
}

compileTestKotlin {
compilerOptions.jvmTarget = JvmTarget.JVM_11
}

java {
withJavadocJar()
withSourcesJar()
}

configurations {
clientLibrary {
canBeConsumed = true
canBeResolved = false
}
}

publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'org.vitrivr'
artifactId = 'cottontaildb-core'
version = System.getenv().getOrDefault("MAVEN_PUBLICATION_VERSION", version.toString())
pom {
name = 'Cottontail DB Core Library'
description = 'The Cottontail DB core library, which is a collection of classes that are used by different Cottontail DB components.'
url = 'https://github.com/vitrivr/cottontaildb/'
licenses {
license {
name = 'MIT License'
}
}
developers {
developer {
id = 'ppanopticon'
name = 'Ralph Gasser'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/vitrivr/cottontaildb.git'
url = 'https://github.com/vitrivr/cottontaildb'
}
}
from components.java
}
}
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
name = "OSSRH"
url = (publishing.publications.mavenJava.version.endsWith('SNAPSHOT')) ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}

signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}

dependencies {
/* The Cottontail DB client library. */
api project(':cottontaildb-client')
Expand Down

0 comments on commit 10f74e0

Please sign in to comment.