Skip to content

Commit c6ae178

Browse files
committed
fix(android): update Gradle publish command to use publishToCentralPortal for Maven Central
1 parent fc3339a commit c6ae178

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ jobs:
263263
echo "Maven Central Username length: ${#MAVEN_CENTRAL_USERNAME}"
264264
echo "Maven Central Token length: ${#MAVEN_CENTRAL_TOKEN}"
265265
echo "Signing key length: ${#SIGNING_KEY}"
266-
cd packages/android && ./gradlew publishReleasePublicationToOSSRHRepository -PVERSION=${{ steps.tag.outputs.version }}
266+
cd packages/android && ./gradlew publishToCentralPortal -PVERSION=${{ steps.tag.outputs.version }}
267267
env:
268268
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
269269
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}

packages/android/build.gradle

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ buildscript {
55
}
66
dependencies {
77
classpath 'com.android.tools.build:gradle:8.5.2'
8+
classpath 'com.gradleup.central:central-publishing:0.4.0'
89
}
910
}
1011

1112
apply plugin: 'com.android.library'
1213
apply plugin: 'maven-publish'
1314
apply plugin: 'signing'
15+
apply plugin: 'com.gradleup.central.publish'
1416

1517
android {
1618
namespace 'ai.sqlite.vector'
@@ -48,6 +50,44 @@ repositories {
4850
dependencies {
4951
}
5052

53+
centralPublishing {
54+
username = project.findProperty("MAVEN_CENTRAL_USERNAME") ?: ""
55+
password = project.findProperty("MAVEN_CENTRAL_TOKEN") ?: ""
56+
57+
pom {
58+
groupId = 'ai.sqlite'
59+
artifactId = 'vector'
60+
version = project.hasProperty('VERSION') ? project.VERSION : ['make', 'version'].execute(null, file('../..')).text.trim()
61+
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+
}
89+
}
90+
5191
afterEvaluate {
5292
publishing {
5393
publications {
@@ -57,46 +97,6 @@ afterEvaluate {
5797
version = project.hasProperty('VERSION') ? project.VERSION : ['make', 'version'].execute(null, file('../..')).text.trim()
5898

5999
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-
}
89-
}
90-
}
91-
92-
repositories {
93-
maven {
94-
name = "OSSRH"
95-
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
96-
credentials {
97-
username = project.findProperty("MAVEN_CENTRAL_USERNAME") ?: ""
98-
password = project.findProperty("MAVEN_CENTRAL_TOKEN") ?: ""
99-
}
100100
}
101101
}
102102
}

0 commit comments

Comments
 (0)