Skip to content

Commit 0c70846

Browse files
committed
feat(android): publish package to Maven Central
1 parent 352521f commit 0c70846

File tree

3 files changed

+58
-5
lines changed

3 files changed

+58
-5
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,11 @@ jobs:
253253
done
254254
255255
- name: release android aar to maven central
256-
if: false # maven central namespace needs to be verified first steps.tag.outputs.version != ''
257-
run: cd packages/android && gradle publishReleasePublicationToOSSRHRepository -PVERSION=${{ steps.tag.outputs.version }}
256+
if: steps.tag.outputs.version != ''
257+
run: cd packages/android && ./gradlew publishReleasePublicationToOSSRHRepository -PVERSION=${{ steps.tag.outputs.version }}
258258
env:
259-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
260-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
259+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
260+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
261261
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
262262
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
263263

packages/android/build.gradle

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ buildscript {
1010

1111
apply plugin: 'com.android.library'
1212
apply plugin: 'maven-publish'
13+
apply plugin: 'signing'
1314

1415
android {
1516
namespace 'ai.sqlite.vector'
@@ -56,7 +57,59 @@ afterEvaluate {
5657
version = project.hasProperty('VERSION') ? project.VERSION : ['make', 'version'].execute(null, file('../..')).text.trim()
5758

5859
artifact bundleReleaseAar
60+
61+
pom {
62+
name = 'SQLite Vector'
63+
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.'
64+
url = 'https://github.com/sqliteai/sqlite-vector'
65+
66+
licenses {
67+
license {
68+
name = 'Elastic License 2.0'
69+
url = 'https://www.elastic.co/licensing/elastic-license'
70+
}
71+
}
72+
73+
developers {
74+
developer {
75+
id = 'sqliteai'
76+
name = 'SQLite Cloud, Inc.'
77+
78+
organization = 'SQLite Cloud, Inc.'
79+
organizationUrl = 'https://sqlite.ai'
80+
}
81+
}
82+
83+
scm {
84+
connection = 'scm:git:git://github.com/sqliteai/sqlite-vector.git'
85+
developerConnection = 'scm:git:ssh://github.com/sqliteai/sqlite-vector.git'
86+
url = 'https://github.com/sqliteai/sqlite-vector'
87+
}
88+
}
5989
}
6090
}
91+
92+
repositories {
93+
maven {
94+
name = "OSSRH"
95+
url = project.hasProperty('VERSION') ?
96+
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" :
97+
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
98+
credentials {
99+
username = project.findProperty("MAVEN_CENTRAL_USERNAME") ?: ""
100+
password = project.findProperty("MAVEN_CENTRAL_TOKEN") ?: ""
101+
}
102+
}
103+
}
104+
}
105+
}
106+
107+
signing {
108+
def signingKey = project.findProperty("SIGNING_KEY")
109+
def signingPassword = project.findProperty("SIGNING_PASSWORD")
110+
111+
if (signingKey && signingPassword) {
112+
useInMemoryPgpKeys(signingKey, signingPassword)
113+
sign publishing.publications.release
61114
}
62115
}

src/sqlite-vector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
extern "C" {
2525
#endif
2626

27-
#define SQLITE_VECTOR_VERSION "0.9.28"
27+
#define SQLITE_VECTOR_VERSION "0.9.29"
2828

2929
SQLITE_VECTOR_API int sqlite3_vector_init (sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi);
3030

0 commit comments

Comments
 (0)