1+ buildscript {
2+ repositories {
3+ google()
4+ mavenCentral()
5+ }
6+ dependencies {
7+ classpath ' com.android.tools.build:gradle:8.5.2'
8+ }
9+ }
10+
11+ plugins {
12+ id ' com.gradleup.nmcp.aggregation' version ' 1.2.0'
13+ }
14+
15+ apply plugin : ' com.android.library'
16+ apply plugin : ' maven-publish'
17+ apply plugin : ' signing'
18+
19+ android {
20+ namespace ' ai.sqlite.agent'
21+ compileSdk 34
22+
23+ defaultConfig {
24+ minSdk 26
25+ targetSdk 34
26+ }
27+
28+ buildTypes {
29+ release {
30+ minifyEnabled false
31+ }
32+ }
33+
34+ compileOptions {
35+ sourceCompatibility JavaVersion . VERSION_1_8
36+ targetCompatibility JavaVersion . VERSION_1_8
37+ }
38+
39+ sourceSets {
40+ main {
41+ jniLibs. srcDirs = [' src/main/jniLibs' ]
42+ }
43+ }
44+ }
45+
46+ repositories {
47+ google()
48+ mavenCentral()
49+ maven { url ' https://jitpack.io' }
50+ }
51+
52+ dependencies {
53+ }
54+
55+ afterEvaluate {
56+ publishing {
57+ publications {
58+ release(MavenPublication ) {
59+ groupId = ' ai.sqlite'
60+ artifactId = ' agent'
61+ version = project. hasProperty(' VERSION' ) ? project. VERSION : [' make' , ' version' ]. execute(null , file(' ../..' )). text. trim()
62+
63+ artifact(project. hasProperty(' AAR_PATH' ) ? project. AAR_PATH : " $buildDir /outputs/aar/android-release.aar" )
64+
65+ // Maven Central metadata
66+ pom {
67+ name = ' sqlite-agent'
68+ description = ' A SQLite extension that enables SQLite databases to run autonomous AI agents, using other SQLite AI extensions.'
69+ url = ' https://github.com/sqliteai/sqlite-agent'
70+
71+ licenses {
72+ license {
73+ name = ' MIT License'
74+ url = ' https://github.com/sqliteai/sqlite-agent/blob/main/LICENSE'
75+ }
76+ }
77+
78+ developers {
79+ developer {
80+ id = ' sqliteai'
81+ name = ' SQLite Cloud, Inc.'
82+ 83+ organization = ' SQLite Cloud, Inc.'
84+ organizationUrl = ' https://sqlite.ai'
85+ }
86+ }
87+
88+ scm {
89+ connection = ' scm:git:git://github.com/sqliteai/sqlite-agent.git'
90+ developerConnection = ' scm:git:ssh://github.com:sqliteai/sqlite-agent.git'
91+ url = ' https://github.com/sqliteai/sqlite-agent/tree/main'
92+ }
93+ }
94+ }
95+ }
96+ }
97+
98+ // Signing configuration for Maven Central
99+ signing {
100+ required { project. hasProperty(" SIGNING_KEY" ) }
101+ if (project. hasProperty(" SIGNING_KEY" )) {
102+ useInMemoryPgpKeys(
103+ project. property(" SIGNING_KEY" ). toString(),
104+ project. property(" SIGNING_PASSWORD" ). toString()
105+ )
106+ sign publishing. publications. release
107+ }
108+ }
109+ }
110+
111+ // Maven Central publishing via NMCP aggregation
112+ nmcpAggregation {
113+ if (project. hasProperty(" SONATYPE_USERNAME" ) && project. hasProperty(" SONATYPE_PASSWORD" )) {
114+ centralPortal {
115+ username = project. property(" SONATYPE_USERNAME" )
116+ password = project. property(" SONATYPE_PASSWORD" )
117+ publishingType = " AUTOMATIC"
118+ }
119+ publishAllProjectsProbablyBreakingProjectIsolation()
120+ }
121+ }
0 commit comments