@@ -14,6 +14,7 @@ plugins {
1414
1515apply plugin : ' com.android.library'
1616apply plugin : ' maven-publish'
17+ apply plugin : ' signing'
1718
1819android {
1920 namespace ' ai.sqlite.vector'
@@ -59,10 +60,11 @@ afterEvaluate {
5960 artifactId = ' vector'
6061 version = project. hasProperty(' VERSION' ) ? project. VERSION : [' make' , ' version' ]. execute(null , file(' ../..' )). text. trim()
6162
62- artifact bundleReleaseAar
63+ artifact tasks . named( " bundleReleaseAar" ) . get() . outputs . files . singleFile
6364
65+ // Maven Central metadata
6466 pom {
65- name = ' SQLite Vector '
67+ name = ' sqlite-vector '
6668 description = ' A cross-platform, ultra-efficient SQLite extension that brings vector search capabilities to your embedded database. Works seamlessly on iOS, Android, Windows, Linux, and macOS, using just 30MB of memory by default.'
6769 url = ' https://github.com/sqliteai/sqlite-vector'
6870
@@ -85,29 +87,34 @@ afterEvaluate {
8587
8688 scm {
8789 connection = ' scm:git:git://github.com/sqliteai/sqlite-vector.git'
88- developerConnection = ' scm:git:ssh://github.com/ sqliteai/sqlite-vector.git'
89- url = ' https://github.com/sqliteai/sqlite-vector'
90+ developerConnection = ' scm:git:ssh://github.com: sqliteai/sqlite-vector.git'
91+ url = ' https://github.com/sqliteai/sqlite-vector/tree/main '
9092 }
9193 }
9294 }
9395 }
9496 }
9597}
9698
99+ // Signing configuration for Maven Central
97100signing {
98- def signingKey = project. findProperty(" SIGNING_KEY" ) ?: System . getenv(" SIGNING_KEY" )
99- def signingPassword = project. findProperty(" SIGNING_PASSWORD" ) ?: System . getenv(" SIGNING_PASSWORD" )
100-
101- if (signingKey && signingPassword) {
102- useInMemoryPgpKeys(signingKey, signingPassword)
101+ required { project. hasProperty(" SIGNING_KEY" ) }
102+ if (project. hasProperty(" SIGNING_KEY" )) {
103+ useInMemoryPgpKeys(
104+ project. property(" SIGNING_KEY" ). toString(),
105+ project. property(" SIGNING_PASSWORD" ). toString()
106+ )
103107 sign publishing. publications. release
104108 }
105109}
106110
111+ // Maven Central publishing via NMCP
107112nmcp {
108- publishAllPublications {
109- username = project. findProperty(" SONATYPE_USERNAME" ) ?: System . getenv(" SONATYPE_USERNAME" )
110- password = project. findProperty(" SONATYPE_PASSWORD" ) ?: System . getenv(" SONATYPE_PASSWORD" )
111- publicationType = " USER_MANAGED"
113+ if (project. hasProperty(" SONATYPE_USERNAME" ) && project. hasProperty(" SONATYPE_PASSWORD" )) {
114+ publishAllPublications {
115+ username = project. property(" SONATYPE_USERNAME" )
116+ password = project. property(" SONATYPE_PASSWORD" )
117+ publicationType = " AUTOMATIC"
118+ }
112119 }
113120}
0 commit comments